On the computation of correctly-rounded sums
Résumé
The computation of sums appears in many domains of numerical analysis. We show that among the set of the algorithms with no comparisons performing only floating-point operations, the 2Sum algorithm introduced by Knuth is optimal, both in terms of number of operations and depth of the dependency graph. We also show that, under reasonable conditions, it is impossible to always obtain the correctly rounded-to-nearest sum of n>= 3 floating-point numbers with an algorithm without tests performing only round-to-nearest additions/subtractions. Boldo and Melquiond have proposed an algorithm to compute the rounded-to-nearest sum of three operands, introducing a new rounding mode unavailable on current hardware, rounding to odd; but their simulation of rounding to odd requires tests. We show that rounding to odd can be be realized using only floating-point additions/subtractions performed in the standard rounding modes and a multiplication by the constant 0.5, thus allowing the rounded-to-nearest sum of three floating-point numbers to be determined without tests. Starting from the algorithm due to Boldo and Melquiond, we also show that the sum of three floating-point values rounded according to any of the standard directed rounding modes can be determined using only additions/subtractions, provided that the operands are of the same sign.
Origine | Fichiers produits par l'(les) auteur(s) |
---|