e-add
▸ function eAdd
(p1
: number[][], p2
: number[][]): number[][]
Defined in basic/expansion/e-add.ts:25
Returns the exact result (bar underflow / overflow) of adding two polynomials with coefficients given as Shewchuk floating point expansions.
example
eAdd([[1],[2],[3]],[[3],[4]]); //=> [[1],[5],[7]]
Parameters:
Name | Type | Description |
---|---|---|
p1 | number[][] | a polynomial with coefficients given densely as an array of Shewchuk floating point expansions from highest to lowest power, e.g. [[5],[-3],[0]] represents the polynomial 5x^2 - 3x |
p2 | number[][] | another polynomial |
Returns: number[][]