Abstract
Double-word (double-double) arithmetic is a common technique for achieving higher precision than standard 64-bit floating-point numbers. However, the performance overhead of "accurate" addition algorithms often limits their utility. This paper re-evaluates "sloppy" double-word addition, demonstrating that it is significantly more robust than previously assumed. By proving that these algorithms maintain high accuracy even with overlapping inputs, we show that costly normalization steps can be omitted in many contexts, leading to substantial performance improvements in operations like matrix multiplication with negligible impact on precision.
Introduction
In high-precision computing, standard IEEE 754 double-precision floats are often insufficient for sensitive numerical simulations. Double-word arithmetic represents a high-precision value as the unevaluated sum of two standard doubles ($x = x_h + x_l$). While effective, the computational cost is high.
Developers typically choose between "accurate" addition (safe but slow) and "sloppy" addition (fast but potentially inaccurate). Conventional wisdom has long warned against the sloppy version unless the operands have the same sign or no "overlap" (where the bits of the two component doubles represent the same power-of-two range). This research challenges that assumption, investigating the true robustness of these algorithms and their potential for high-performance computing.
Theoretical Analysis of Sloppy Addition
The core of this research lies in a rigorous mathematical re-evaluation of error bounds. Using Sterbenz’s Lemma and Error-Free Transformations (such as 2Sum and Fast2Sum), the authors prove that the sloppy addition algorithm guarantees an error bound of $O(u^2)$—approximately $10^{-32}$—even when inputs exhibit moderate overlap.
A key insight involves the Multiplication-Addition Approach (MAA). In standard double-double multiplication, a "normalization" step is usually required to ensure the resulting components do not overlap. The authors demonstrate that this expensive step can be safely bypassed if the result is immediately followed by an addition, as the addition logic effectively "absorbs" the lack of normalization without compromising precision.
Implementation and Hardware Optimization
To validate these theoretical findings, the algorithms were implemented using modern hardware features, specifically Intel AVX-512 instructions. By leveraging the vrangepd instruction, the researchers eliminated conditional branches in the addition logic. This hardware-level optimization, combined with the removal of redundant normalization steps, significantly reduces the clock cycles required for high-precision arithmetic.
Furthermore, the study identifies a synergy with interval arithmetic. In directed rounding modes (rounding toward $+\infty$ or $-\infty$), the errors of these algorithms remain consistent with the rounding direction. This allows researchers to avoid toggling the CPU's rounding mode—a notorious performance killer—while maintaining the integrity of interval bounds.
Experimental Results
The performance and accuracy of the proposed methods were tested using synthetic random inputs and General Matrix Multiplication (GEMM) benchmarks.
Performance Gains
By skipping normalization and employing optimized sloppy addition, the researchers achieved an 84% performance increase in double-double multiplication-addition operations. The optimized GEMM implementation reached between 80.1% and 87.4% of the theoretical peak performance on an Intel Xeon Gold 6148 processor. This level of efficiency is exceptional for software-based extended precision, which typically struggles to approach hardware peak performance.
Precision and Accuracy
Numerical experiments confirmed the theoretical proofs. Using arrays of $10^6$ random numbers, the researchers verified that the "modified" relative error remained extremely low, consistently around $10^{-32}$. This confirms that the performance shortcuts do not lead to the "error explosion" feared by practitioners using traditional double-double libraries.
Limitations and Future Outlook
While robust, the sloppy algorithm is not a universal replacement. It remains susceptible to significant relative error in cases of extreme cancellation—where two nearly identical numbers are subtracted. In such rare edge cases, the error can approach $O(1)$. Additionally, the most dramatic performance gains are currently tied to specific modern instruction sets like AVX-512, though the theoretical benefits apply broadly across architectures.
Future work will explore applying these robustness insights to other mathematical functions, such as the evaluation of Taylor expansions for sine and logarithm evaluations, where sloppy addition could further streamline high-precision libraries without sacrificing reliability.
Summary updated