Function horner::eval_known_rank_polynomial [−][src]
pub fn eval_known_rank_polynomial<T: Zero + MulAddAssign + Copy, const N: usize>(
x: T,
coefficients: &[T; N]
) -> T
Expand description
Evaluate a polynomial of rank known at compile-time using Horner’s method.
For now this function simply calls eval_any_rank_polynomial, but the idea is that in the future we may be able to optimize our code further in the case where the rank of the polynomial is known at compile-time.
Example usage:
use horner::eval_known_rank_polynomial; assert_eq!(0, eval_known_rank_polynomial(-4, &[1, 4]));
See also: eval_any_rank_polynomial