poly
fn
Unqual!(CommonType!(T1, T2)) poly(T1, T2)(T1 x, in T2[] A) if (isFloatingPoint!T1 && isFloatingPoint!T2) @trusted pure nothrow @nogcEvaluate 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
x | the value to evaluate. |
A | array of coefficients a, 0, a, 1, etc. |
fn
Unqual!(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 @nogcditto