e-degree
▸ function eDegree
(p
: number[][]): number
Defined in basic/expansion/e-degree.ts:16
Returns the degree of the given polynomial - the zero polynomial degree is returned as -1 (and not -∞ as is conventional).
example
eDegree([[9],[8],[7],[6],[5],[4],[3],[2],[1]]); //=> 8
Parameters:
Name | Type | Description |
---|---|---|
p | 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 |
Returns: number