Function statrs::function::evaluate::polynomial[][src]

pub fn polynomial(z: f64, coeff: &[f64]) -> f64

evaluates a polynomial at z where coeff are the coeffecients to a polynomial of order k where k is the length of coeff and the coeffecient to the kth power is the kth element in coeff. E.g. [3,-1,2] equates to 2z^2 - z + 3

Remarks

Returns 0 for a 0 length coefficient slice