Abstract
We present two algorithms for computing correctly rounded sums of arrays of floating-point numbers. First, iFastSum improves upon our previous FastSum by requiring no additional space beyond the original array, which is destroyed. It runs about 20% faster than FastSum in the general case and two times faster when extremely ill-conditioned data are used. The second algorithm is HybridSum, which combines three summation ideas together: splitting the mantissa, radix sorting, and using iFastSum. The result is that when the number of summands is greater than about $10^4$, for a given n its running time is almost a constant, independent of the condition number. It runs almost as fast as iFastSum in the general case and much faster than iFastSum when ill-conditioned data are used. HybridSum requires only one pass through the input array and uses constant storage, and it is thus suitable for exact summation as an “online” algorithm. Neither algorithm requires extra precision accumulators, and both work in any base. Their accuracy is guaranteed independent of the condition number and the number of summands.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have