Analysis and Detection of Stagnation in Floating-Point Summation
arXiv:2610.10819
Abstract
Stagnation in the summation of floating-point numbers occurs when the running sum, or the accumulator, does not change its value despite addends being greater than zero. Here we define different types of stagnation - commonly referred to as swamping or absorption, where one operand in an addition is nearly or completely rounded off---in floating-point summation, and propose algorithms for detecting it in numerical code that uses floating-point arithmetic. Whilst cancellation in floating-point arithmetic has been studied, for example by Lam et al. in `Dynamic floating point cancellation detection', stagnation has not been exploited as a property for detecting and reporting accuracy loss in floating-point operations. We have built prototype dynamic stagnation detection tools in two languages, MATLAB and Julia, and applied them to applications ranging from basic summation of a vector, to matrix multiplication, to a fluid flow simulation model. With this tool, users are able to identify areas of their floating-point code where stagnation occurs - in those areas of the code one may need to switch to a higher precision number format, apply stochastic rounding, or use different summation algorithms such as compensated summation. To the best of our knowledge we provide a first rigorous definition of stagnation in floating-point summation.
arXiv commentSubmitted to Numerical Algorithms on 07/10/2026. Resubmitted with minor changes on 09/10/2026