Chi-SquaredFit v0.7.6 Chi2fit.Roots View Source

Solves roots for linear, quadratic, and cubic equations.

Link to this section Summary

Functions

Returns the real roots of polynoms of order 1, 2 and 3 as a list

Link to this section Functions

Link to this function solve(list) View Source
solve([float]) :: [float]

Returns the real roots of polynoms of order 1, 2 and 3 as a list.

Examples

Solve `2.0*x + 5.0 = 0`
iex> solve [2.0,5.0]
[-2.5]

iex> solve [2.0,-14.0,24.0]
[4.0,3.0]

iex> solve [1.0,0.0,5.0,6.0]
[-0.9999999999999999]