Mirrors the C# Evaluate class's three polynomial evaluators (Horner's method), vectorized
over x against one shared coefficients vector: variant = "standard" calls
Evaluate.Polynomial (coefficients in ASCENDING order, coefficients[1] the constant term);
"reverse" calls Evaluate.PolynomialRev (coefficients in DESCENDING order,
coefficients[1] the highest-order term), optionally truncated to order n + 1 via n;
"reverse_unit" calls Evaluate.PolynomialRev_1 (DESCENDING order with an implicit leading
coefficient of 1).
Usage
polynomial_eval(
coefficients,
x,
variant = c("standard", "reverse", "reverse_unit"),
n = NULL
)