UNPKG

quaeratin

Version:

An extended precision floating point library (as per Shewchuk) - precision only limited by overflow / underflow

14 lines 315 B
/** * Returns the exact result of subtracting b from a (as a floating point * expansion). * @param a * @param b */ function twoDiff(a, b) { const x = a - b; const bvirt = a - x; const y = (a - (x + bvirt)) + (bvirt - b); return [y, x]; } export { twoDiff }; //# sourceMappingURL=two-diff.js.map