835 articles – 1515 Notices  [english version]
HAL : hal-00576641, version 1

Fiche détaillée  Récupérer au format
How do you compute the midpoint of an interval?
Frédéric Goualard 1
(14/03/2011)

The algorithm that computes the midpoint of an interval with floating-point bounds requires some careful devising to correctly handle all possible inputs. We review several implementations from prominent C/C++ interval arithmetic packages and analyze their potential failure to deliver correct results. We then highlight two implementations that avoid common pitfalls. The results presented are also relevant to non-interval arithmetic computation such as the implementation of bisection methods. Enough background on IEEE 754 floating-point arithmetic is provided for this paper to serve as a practical introduction to the analysis of floating-point computation.
1 :  Laboratoire d'Informatique de Nantes Atlantique (LINA)
CNRS : UMR6241 – Université de Nantes – École Nationale Supérieure des Mines - Nantes
Informatique/Arithmétique des ordinateurs
rounding error – floating-point number – midpoint – interval arithmetic – IEEE 754 standard
Liste des fichiers attachés à ce document : 
PDF
computing-midpoint.pdf(667 KB)