A Fast Compensated Algorithm for Computing Givens Rotations
Carlos F. Borges
TL;DR
This paper tackles the numerical accuracy of computing Givens rotations by introducing a simple compensated scheme that corrects a naively computed rotation using itself. The core idea is to model the true rotation as a small perturbation of the computed one and derive a linearized compensation that is applied via high-precision, double-length arithmetic. The authors present a compensated DLARTG algorithm, with and without $fma()$, that delivers perfect accuracy across various $hypot()$ implementations, highlighting its robustness for LAPACK-style linear algebra routines and practical benefit when compute environments offer limited floating-point precision. The work demonstrates that compensation improves reliability of rotation computations even when the underlying hypot is less accurate, enabling more stable QR factorizations and related algorithms.
Abstract
We develop a very simple compensated scheme for computing very accurate Givens rotations. The approach is significantly more straightforward than the one in \cite{borges2021fast}, and the derivation leads to a very satisfying algorithm whereby a naively computed Givens rotation can be used to construct a correction to itself. It is also seen that this scheme continues to provide high accuracy even when built on a hypoteneuse calculation that is of lesser accuracy.
