uxarray.utils.computing._two_prod_fma#

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

Error-free transformation of the product of two floating-point numbers using FMA, such that a * b = x + y exactly.

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

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

Returns:

The product and the error term.

Return type:

tuple of float

Examples

>>> _two_prod_fma(1.0, 2.0)
(2.0, 0.0)