uxarray.utils.computing._two_sum#

uxarray.utils.computing._two_sum(a, b)#

Error-free transformation of the sum of two floating-point numbers such that a + b = x + y exactly

Parameters:
  • a (float) – The floating-point numbers to be added.

  • b (float) – The floating-point numbers to be added.

Returns:

The sum and the error term.

Return type:

tuple of float

Examples

>>> _two_sum(1.0, 2.0)
(3.0, 0.0)