comp-horner-with-running-error
▸ function compHornerWithRunningError
(p
: number[], x
: number): number[]
Defined in evaluate/double/comp-horner-with-running-error.ts:42
Returns the result of evaluating a univariate polynomial using once compensated Horner's method, including a certified running error bound as an array in the form: [result, absolute error].
Exactly the same as compHornerIsFaithful, except that it does not include a faithfully rounded check.
once compensated means the error in the evaluation is reduced by roughly
1 / Number.EPSILON
which is again roughly2^53
- it is the same as using double-double precision in a normal Horner evaluationsee also Horner's Method
Parameters:
Name | Type | Description |
---|---|---|
p | number[] | 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 |
x | number | the value at which to evaluate the polynomial |
Returns: number[]