/** * Returns the negative of the given polynomial (p -> -p). * * @param p a polynomial with coefficients given densely as an array of double-dboule * floating point numbers from highest to lowest power * * @doc */ function ddNegate(p: number[][]): number[][] { const p_ = new Array(p.length); for (let i=0; i