horner-with-running-error
▸ function hornerWithRunningError
(p
: number[], x
: number): number[]
Defined in evaluate/double/horner-with-running-error.ts:19
Returns the result of evaluating a polyniomial at a point x, including a
running error bound as an array in the form [r,e]
where r
is the result
of the evaluation and e
is the error.
- see e.g. page 95 (at bottom) of Higham 2002
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[]