Skip to main content

polyval

Function polyval 

Source
pub fn polyval(coeffs: &[f64], x: &[f64]) -> Vec<f64>
Expand description

Evaluate polynomial at given points using Horner’s method.

coeffs = [a0, a1, ..., an] where p(x) = a0 + a1*x + ... + an*x^n. Horner form: p(x) = a0 + x*(a1 + x*(a2 + ... + x*an)).