Skip to main content

Module polynomial_roots

Module polynomial_roots 

Source
Expand description

Polynomial roots as the eigenvalues of the companion matrix: all (complex) roots, or the real ones, polished and with repeated roots merged.

See the book entry Polynomial roots.

Functions§

polynomial_roots
Returns the real roots of a polynomial in ascending order.
polynomial_roots_complex
All roots of a polynomial, complex ones included, as the eigenvalues of its companion matrix (the method of MATLAB’s roots), sorted by real part and then imaginary part. Repeated roots appear with their multiplicity (and, being ill-conditioned, are accurate only to about ε^(1/m) for multiplicity m).