// //-------------------------- // // SUPERSEDED BY `eTaylorShift` !! // //-------------------------- // import { expansionProduct } from "big-float-ts"; // import { fastExpansionSum } from "big-float-ts"; // import { scaleExpansion2 } from "big-float-ts"; // /** // * Returns the exact result (bar undeflow / overflow) of performing a change of // * variables of the form: p(x) <- p(x + b) on the given polynomial (with // * coefficients given as Shewchuk expansions). // * // * * see [this stackoverflow question](http://stackoverflow.com/questions/141422/how-can-a-transform-a-polynomial-to-another-coordinate-system) // * // * @param p 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` // * @param b the `b` in `x + b` // * // * @doc // */ // function eChangeVariablesTranslateX( // p: number[][], // b: number): number[][] { // // We let the coefficients of p(x + b) be denoted by d_i in the code below. // // d_i is calculated as d = T*c, where c are the original coefficients. // const d = p.length-1; // if (d < 0) { return []; } // // Initialize a zero matrix // const t = new Array(d+1); // for (let i=0; i