abs-horner
▸ function AbsHorner
(p
: number[], x
: number): number
Defined in evaluate/double/abs-horner.ts:17
Returns the result of evaluating a univariate polynomial using Horner's method and where the absolute value of each coefficient is taken.
- intermediate calculations are done in double precision
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 p should be evaluated |
Returns: number