e-equal
▸ function eEqual
(p1
: number[][], p2
: number[][]): boolean
Defined in basic/expansion/e-equal.ts:24
Returns true if two polynomials (with coefficients given as Shewchuk floating point expansions) are exactly equal by comparing coefficients, false otherwise.
example
eEqual([[1],[2],[3],[0,4]], [[1],[2],[3],[4]]); //=> true
eEqual([[1],[2],[3],[4]], [[1],[2],[3],[4],[5]]); //=> false
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: boolean