hmatrix-0.9.3.0: Linear algebra and numerical computationSource codeContentsIndex
Numeric.GSL.Polynomials
Portabilityuses ffi
Stabilityprovisional
MaintainerAlberto Ruiz (aruiz at um dot es)
Description

Polynomials.

http://www.gnu.org/software/gsl/manual/html_node/General-Polynomial-Equations.html#General-Polynomial-Equations

Synopsis
polySolve :: [Double] -> [Complex Double]
Documentation
polySolve :: [Double] -> [Complex Double]Source

Solution of general polynomial equations, using gsl_poly_complex_solve. For example, the three solutions of x^3 + 8 = 0

> polySolve [8,0,0,1]
[(-1.9999999999999998) :+ 0.0,
 1.0 :+ 1.732050807568877,
 1.0 :+ (-1.732050807568877)]

The example in the GSL manual: To find the roots of x^5 -1 = 0:

> polySolve [-1, 0, 0, 0, 0, 1]
[(-0.8090169943749475) :+ 0.5877852522924731,
(-0.8090169943749475) :+ (-0.5877852522924731),
0.30901699437494734 :+ 0.9510565162951536,
0.30901699437494734 :+ (-0.9510565162951536),
1.0 :+ 0.0]
Produced by Haddock version 2.6.1