subtract
▸ function subtract
(p1
: number[], p2
: number[]): number[]
Defined in basic/double/subtract.ts:24
Returns the result of subtracting the second polynomial from the first in double precision; (p1 - p2).
example
subtract([2,3],[4,4]); //=> [-2, -1]
Parameters:
Name | Type | Description |
---|---|---|
p1 | number[] | minuend; the polynomial from which will be subtracted; a polynomial with coefficients given densely as an array of double floating point numbers from highest to lowest power, e.g. [5,-3,0] represents the polynomial 5x^2 - 3x |
p2 | number[] | subtrahend; the polynomial that will be subtracted |
Returns: number[]