Fast compensated algorithms for the reciprocal square root, the reciprocal hypotenuse, and givens rotations

Authors
Borges, Carlos F.
Advisors
Second Readers
Subjects
Date of Issue
2021-06-11
Date
11 June 2021
Publisher
ArXiv
Language
Abstract
The reciprocal square root is an important computation for which many very sophisticated algorithms exist (see for example [8, 3, 4] and the references therein). In this paper we develop a simple differential compensation (similar to those developed in [2]) that can be used to improve the accuracy of a naive calculation. The approach relies on the use of the fused multiply-add (FMA) which is widely available in hardware on a variety of modern computer architectures. We first show how compensate by computing an exact Newton step and investigate the properties of this approach. We then show how to leverage the exact Newton step to get a modified compensation which requires one additional FMA and one additional multiplication. This modified method appears to give correctly rounded results experimentally and we show that it can be combined with a square root free method for estimating the reciprocal square root to get a method that is both very fast (in computing environments with a slow square root) and, experimentally, highly accurate. Finally, we show how these approaches can be extended to the reciprocal hypotenuse calculation and the construction of Givens rotations.
Type
Preprint
Description
Series/Report No
Department
Applied Mathematics
Organization
Identifiers
NPS Report Number
Sponsors
Funding
Format
11 p.
Citation
Borges, Carlos F. "Fast Compensated Algorithms for the Reciprocal Square Root, the Reciprocal Hypotenuse, and Givens Rotations." arXiv preprint arXiv:2103.08694 (2021).
Distribution Statement
Rights
This publication is a work of the U.S. Government as defined in Title 17, United States Code, Section 101. Copyright protection is not available for this work in the United States.
Collections