eft-horner

▸ function EFTHorner (p: number[], x: number): object

Defined in evaluate/double/eft-horner.ts:28

Returns an EFT (error free transformation) for the Horner evaluation of a polymial at a specified x. The result is returned as an object with properties: r̂ -> the calculated evaluation, pπ and pσ -> two polynomials with coefficients around 2^53 times smaller than the input polynomial.

Parameters:

NameTypeDescription
pnumber[]a polynomial with coefficients given densely as an array of double floating point numbers from highest to lowest power, e.g. [5,-3,0] represents the polynomial 5x^2 - 3x
xnumberthe value at which to evaluate the polynomial

Returns: object

NameType
number
number[]
number[]