evaluate-at-1

▸ function evaluateAt1 (p: number[]): number

Defined in evaluate/double/evaluate-at-1.ts:13

Returns the result of evaluating the given polynomial at 1 using double precision for intermediate calculations.

  • faster than at an arbitrary point.

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

Returns: number