uxarray.utils.computing._two_prod_fma

Contents

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)

Stef Graillat. Accurate Floating Point Product and Exponentiation. IEEE Transactions on Computers, 58(7), 994–1000, 2009.10.1109/TC.2008.215.