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:

NameTypeDescription
p1number[][]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
p2number[][]another polynomial

Returns: number[][]