Evaluate polynomial A(x) = a0 + a1x + a2x2 + a3x3; ...
Uses Horner's rule A(x) = a0 + x(a1 + x(a2 + x(a3 + ...)))
the value to evaluate.
array of coefficients a0, a1, etc.
real x = 3.1L; static real[] pp = [56.1L, 32.7L, 6]; assert(poly(x, pp) == (56.1L + (32.7L + 6.0L * x) * x));
See Implementation
Evaluate polynomial A(x) = a0 + a1x + a2x2 + a3x3; ...
Uses Horner's rule A(x) = a0 + x(a1 + x(a2 + x(a3 + ...)))