multiply

▸ function multiply (p1: number[], p2: number[]): number[]

Defined in basic/double/multiply.ts:25

Returns the result of multiplying 2 polynomials in double precision.

example

multiply([1,2,3], [2,5,3,5]); //=> [2, 9, 19, 26, 19, 15]

Parameters:

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

Returns: number[]