arXiv:2611.08371cs.MSNov 2026

Manuscript Offprint

arXiv:2611.08371

Lord of the Precision, the Two Floats: Double-Word Arithmetic for Complex Numbers

František Stloukal, Fabienne Jézéquel

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Datacenter GPUs increasingly favor low-precision floating-point formats, offering higher throughput than FP64. Double-word (DW) arithmetic represents numbers as unevaluated sums of two floating-point values, providing higher accuracy. We present the first error analysis of complex DW multiplication and division. Both operations reduce to sums of two DW products, combined using one of three DW addition algorithms: accurate, sloppy, or Madd. Normalizing DW products ensures nonoverlapping components, but omitting this step reduces the number of arithmetic operations. We bound the resulting overlap and prove that Madd retains a relative error bound of 3u2+O(u3)3u^2 + O(u^3) for overlapping inputs, where uu is the unit roundoff. For all variants, we establish relative error bounds of the form (ακ+β)u2+O(u3)(\alpha\kappa + \beta)u^2 + O(u^3), where κ\kappa is the condition number of the sum of products. Our analysis shows that the less expensive sloppy addition suffices. We implement these variants in CompleXDW, an open-source C++ library for CPUs and GPUs. In the high-energy physics code MadGraph7, FP32-based DW arithmetic achieves up to 2.9×2.9\times and 2.1×2.1\times higher throughput than FP64 on NVIDIA L40S and AMD Radeon Pro W7900 GPUs, respectively, while losing approximately 1.4 correct significant digits.

Keywords: double-word arithmetic, complex arithmetic, floating-point error analysis, error-free transformations, GPU computing, high-energy physics, Monte Carlo event generation

*frantisek.stloukal@cern.ch †fabienne.jezequel@lip6.fr

1 Introduction

In recent years, a performance plateau or even decline has been observed for the FP64 floating-point type in the realm of datacenter-grade GPUs. At the same time, FP64 floating-point precision remains essential for scientific computing, while vendors have increasingly focused on the development of hardware for machine learning applications, which benefit from the higher performance offered by lower-precision types. One way to address this issue is to achieve the required precision through computations performed with lower-precision types, taking advantage of their higher computational throughput. Several approaches have been proposed, including the emulation of floating-point matrix multiplication using integer arithmetic [29, 27], compensated algorithms [26], and multi-word arithmetic [13, 19, 24, 16].

The latter approach is particularly promising when encapsulated in a well-defined type, as it provides an algorithm-agnostic way to leverage lower-precision performance. The idea relies on representing a number as an unevaluated sum of floating-point words. Subsequently, algorithms defining arithmetic operations over such representations are used to evaluate numerical operators and algebraic functions. Despite extensive research on multi-word arithmetic, no error analysis of complex double-word arithmetic has, to the best of our knowledge, been published. Such an analysis is relevant to numerous fields that rely on complex arithmetic, including quantum physics, signal and image processing, fluid dynamics, and structural mechanics. To fill this gap, we build on recent advances in double-word arithmetic and extend them to complex arithmetic.

In double-word arithmetic, the two floating-point components are referred to as the high and low components. Normalization ensures that they do not overlap. Arithmetic operations rely on error-free transformations (EFTs), which recover rounding errors exactly under suitable assumptions [8, 20]. Rigorous error bounds have been established for basic double-word operations, alongside new division algorithms [19]. Subsequent formal verification of these results led to tighter bounds for several operations [24]. Further work introduced and automatically verified a new double-word addition algorithm, named Madd by its authors, with a tighter error bound than the previous best-known algorithm [34, 35]. The analysis of double-word addition has also been extended to inputs with moderately overlapping components [32, 33].

This paper is devoted to complex double-word arithmetic, with particular emphasis on multiplication and division. Our contributions are as follows:

  • We provide the first error analysis of complex double-word multiplication and division. Since these operations combine double-word multiplications and additions, we establish error bounds for variants using different addition algorithms, with and without intermediate normalization.

  • Building on the approach of omitting the final renormalization step of double-word multiplication [32, 33], we investigate the resulting performance gains in complex arithmetic. Although this omission introduces overlap in the inputs to subsequent additions, we prove that Madd remains accurate and is more robust than alternative addition algorithms.

  • We compare the accuracy and performance of these variants, assessing the trade-offs between addition algorithms and normalization strategies.

  • We develop the open-source ComplexXDW library for complex double-word arithmetic targeting CPUs, including SIMD implementations, and GPUs through CUDA and HIP. In a high-energy physics application on GPUs, the library achieves nearly three times the throughput of native FP64 arithmetic.

The paper is structured as follows. Section 2 introduces the notation and the basic principles of floating-point arithmetic and error-free transformations (EFTs). Section 3 reviews the double-word algorithms used in this work and their known error bounds. Section 4 investigates the robustness of double-word addition algorithms when the input components overlap. Section 5 bounds the overlap between the result components of double-word multiplication and squaring when the final renormalization step is omitted. Sections 6 and 7 build on these results to derive error bounds for the different variants of complex multiplication and division and compare their operation counts. Section 8 presents the CompleXDW library and numerical experiments evaluating accuracy on random inputs with varying condition numbers and through a worst-case search, CPU performance, and accuracy and throughput in a high-energy physics application on GPUs. Section 9 discusses related work, and Section 10 concludes the paper.

References (29)