Skip to main content

polynomial_roots_complex

Function polynomial_roots_complex 

Source
pub fn polynomial_roots_complex(
    coeffs: &[f64],
) -> Result<Vec<Complex<f64>>, String>
Expand description

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).