Skip to main content

polynomial_eval

Function polynomial_eval 

Source
pub fn polynomial_eval<T: IsAnalytic>(
    coeffs: &[T],
    x: Complex<f64>,
) -> Complex<f64>
Expand description

Evaluate a polynomial at x using Horner’s rule.

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

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