import { ddMultDd } from "double-double"; import { ddRemoveLeadingZeros } from "./dd-remove-leading-zeros.js"; /** * Returns the result of multiplies a polynomial by a constant in double-double * precision. * * @param c a constant in double-double precision * @param p a polynomial with coefficients given densely as an array of double-double * floating point numbers from highest to lowest power * * @doc */ function ddMultiplyByConst(c: number[], p: number[][]): number[][] { if (c[1] === 0) { return [[0,0]]; } const d = p.length; const p_ = new Array(d); for (let i=0; i [0.75, 0.5, 0.25]