uxarray.utils.computing._fast_two_mult

Contents

uxarray.utils.computing._fast_two_mult#

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

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

This function is faster than the _two_prod_fma function.

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

References

Vincent Lefèvre, Nicolas Louvet, Jean-Michel Muller, Joris Picot, and Laurence Rideau. 2023. Accurate Calculation of Euclidean Norms Using Double-word Arithmetic. ACM Trans. Math. Softw. 49, 1, Article 1 (March 2023), 34 pages. https://doi.org/10.1145/3568672