Skip to content

Utils.Function.evaluatePoly

Christian d'Heureuse edited this page Sep 25, 2026 · 1 revision

commons-math-interpolation / Utils / evaluatePoly

Function: evaluatePoly()

function evaluatePoly(c, x): number;

Defined in: Utils.ts:77

Evaluates a polynomial, using Horner's method.

Parameters

c

ArrayLike<number>

The polynomial coefficients in ascending order, i.e. the polynomial is c[0] + c[1] * x + c[2] * x^2 + ....

x

number

The argument value.

Returns

number

The value of the polynomial at x, or 0 if c is empty.

Clone this wiki locally