e-multiply-by-const

▸ function eMultiplyByConst (c: number[], p: number[][]): number[][]

Defined in basic/expansion/e-multiply-by-const.ts:26

Returns the exact result (bar underflow / overflow) of multiplying a polynomial (with coefficients given as Shewchuk floating point expansions) by a constant (given as a Shewchuk floating point expansion)

example

eMultiplyByConst([0.25], [[3],[2],[1]]); //=> [[0.75], [0.5], [0.25]]

Parameters:

NameTypeDescription
cnumber[]a constant (given as a Shewchuk floating point expansion)
pnumber[][]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[][]