b-horner
▸ function bHorner
(p
: bigint[], x
: bigint): bigint
Defined in evaluate/bigint/b-horner.ts:14
Returns the result of evaluating (at an integer value) a univariate polynomial with bigint coefficients using Horner's method.
- see Horner's Method
Parameters:
Name | Type | Description |
---|---|---|
p | bigint[] | a polynomial with coefficients given densely as an array of bigints from highest to lowest power, e.g. [5,-3,0] represents the polynomial 5x^2 - 3x |
x | bigint | the value at which to evaluate the polynomial |
Returns: bigint