Function sim::utils::evaluate_polynomial
source · pub fn evaluate_polynomial(
coefficients: &[f64],
x: f64
) -> Result<f64, SimulationError>
Expand description
The function evaluates a polynomial at a single value, with coefficients defined as a slice, from the highest polynomial order to the zero order. Horner’s method is used for this polynomial evaluation