Skip to main content

polynomial_roots

Function polynomial_roots 

Source
pub fn polynomial_roots<T: IsAnalytic>(coeffs: &[T]) -> Result<C1D, ErrorsJSL>
Expand description

Compute the roots of a polynomial using a companion-matrix eigenvalue solve.

The coefficient slice is interpreted in descending powers, so [a0, a1, ..., an] represents:

a0*x^n + a1*x^(n-1) + ... + an