On the computation of correctly-rounded sums - ENS de Lyon - École normale supérieure de Lyon
Pré-Publication, Document De Travail Année : 2008

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.
Fichier principal
Vignette du fichier
3andn-sums-4-RR.pdf (135.37 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

ensl-00331519 , version 1 (17-10-2008)
ensl-00331519 , version 2 (13-12-2010)

Identifiants

  • HAL Id : ensl-00331519 , version 1

Citer

Jean-Michel Muller, Peter Kornerup, Vincent Lefèvre, Nicolas Louvet. On the computation of correctly-rounded sums. 2008. ⟨ensl-00331519v1⟩
389 Consultations
604 Téléchargements

Partager

More