poly

fnUnqual!(CommonType!(T1, T2)) poly(T1, T2)(T1 x, in T2[] A) if (isFloatingPoint!T1 && isFloatingPoint!T2) @trusted pure nothrow @nogc

Evaluate polynomial A(x) = a, 0 + a, 1x + a, 2x2 +

a,3x3; ...

Uses Horner's rule A(x) = a, 0 + x(a, 1 + x(a, 2 + x(a, 3 + ...)))

Parameters

xthe value to evaluate.
Aarray of coefficients a, 0, a, 1, etc.
fnUnqual!(CommonType!(T1, T2)) poly(T1, T2, int N)(T1 x, ref const T2[N] A) if (isFloatingPoint!T1 && isFloatingPoint!T2 && N > 0 && N <= 10) @safe pure nothrow @nogc

ditto