101. Accurate Calculation of Euclidean Norms Using Double-word Arithmetic.
- Author
-
LEFÈVRE, VINCENT, LOUVET, NICOLAS, MULLER, JEAN-MICHEL, PICOT, JORIS, and RIDEAU, LAURENCE
- Subjects
- *
FLOATING-point arithmetic , *ARITHMETIC , *SQUARE root - Abstract
We consider the computation of the Euclidean (or L2) norm of an n-dimensional vector in floating-point arithmetic. We review the classical solutions used to avoid spurious overflow or underflow and/or to obtain very accurate results. We modify a recently published algorithm (that uses double-word arithmetic) to allow for a very accurate solution, free of spurious overflows and underflows. To that purpose, we use a double-word square-root algorithm of which we provide a tight error analysis. The returned L2 norm will be within very slightly more than 0.5 ulp from the exact result, which means that we will almost always provide correct rounding. [ABSTRACT FROM AUTHOR]
- Published
- 2023
- Full Text
- View/download PDF