twoProduct

Returns the exact result of multiplying two doubles.

  • the resulting array is the reverse of the standard twoSum in the literature.

Theorem 18 (Shewchuk): Let a and b be p-bit floating-point numbers, where p >= 6. Then the following algorithm will produce a nonoverlapping expansion x + y such that ab = x + y, where x is an approximation to ab and y represents the roundoff error in the calculation of x. Furthermore, if round-to-even tiebreaking is used, x and y are non-adjacent.

See https://people.eecs.berkeley.edu/~jrs/papers/robustr.pdf

Parameters

a

A double

b

Another double