Accurate Calculation of Euclidean Norms Using Double-word Arithmetic
Open Access
- 21 March 2023
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Mathematical Software
- Vol. 49 (1) , 1-34
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.Keywords
Funding Information
- French Agence Nationale de la Recherche (ANR-20-CE48-0014)
This publication has 34 references indexed in Scilit:
- Formalization of real analysis: a survey of proof assistants and librariesMathematical Structures in Computer Science, 2015
- Verified Compilation of Floating-Point ComputationsJournal of Automated Reasoning, 2014
- On Ziv's rounding testACM Transactions on Mathematical Software, 2013
- Representable correcting terms for possibly underflowing floating point operations2004
- Scalar fused multiply-add instructions produce floating-point matrix arithmetic provably accurate to the penultimate digitACM Transactions on Mathematical Software, 2003
- Handling floating-point exceptions in numeric programsACM Transactions on Programming Languages and Systems, 1996
- Implementing complex elementary functions using exception handlingACM Transactions on Mathematical Software, 1994
- A Portable Fortran Program to Find the Euclidean Norm of a VectorACM Transactions on Mathematical Software, 1978
- A floating-point technique for extending the available precisionNumerische Mathematik, 1971
- Quasi double-precision in floating point additionBIT Numerical Mathematics, 1965