uxarray.utils.computing._acc_sqrt

Contents

uxarray.utils.computing._acc_sqrt#

uxarray.utils.computing._acc_sqrt(T, t)#

Compute the accurate square root of a number with a compensation for round-off error.

This function calculates the square root of a number, taking into account a compensation term for the round-off error.

Parameters:
  • T (float) – The number whose square root is to be computed.

  • t (float) – The compensation term for round-off error.

Returns:

The accurate square root of the number.

Return type:

float

Examples

>>> _acc_sqrt(9.0, 0.0)
3.0

References

Vincent Lef`evre, Nicolas Louvet, Jean-Michel Muller, Joris Picot, and Laurence Rideau. Accurate Calculation of Euclidean Norms Using Double-Word Arithmetic. ACM Transactions on Mathematical Software, 49(1), 1–34, March 2023. 10.1145/3568672

Marko Lange and Siegfried Rump. Faithfully Rounded Floating-point Computations. ACM Transactions on Mathematical Soft- ware, 46, 1-20, 2020. 10.1145/3290955