UNPKG

double-double

Version:

Pure double-double precision functions *with strict error bounds*.

15 lines (14 loc) 556 B
/** * Returns the exact result of adding two doubles. * * * the resulting array is the reverse of the standard twoSum in the literature. * * Theorem 7 (Knuth): Let a and b be p-bit floating-point numbers. Then the * following algorithm will produce a nonoverlapping expansion x + y such that * a + b = x + y, where x is an approximation to a + b and y is the roundoff * error in the calculation of x. * * See https://people.eecs.berkeley.edu/~jrs/papers/robustr.pdf */ declare function twoSum(a: number, b: number): number[]; export { twoSum };