import { exponent } from "big-float-ts"; import { bitLength } from "big-float-ts"; /** * Returns the result of scaling the given array of array of floats by the * *same* power of two such that all floats become integers (bar overflow). * * * the result is exact (no round-off can occur, but overflow can) * * can be used to scale polynomials (with coefficients given as Shewchuk * expansions) * * @param ass an array of an array of double precision floating point numbers * * @doc */ function scaleFloatssToIntss(ass: number[][]): number[][] { let e = -1024; for (let i=0; i e) { e = scaleFactor; } } } return ass.map(as => as.map(a => a*2**e)); } export { scaleFloatssToIntss }