How do you compute the midpoint of an interval? - Archive ouverte HAL Access content directly
Journal Articles ACM Transactions on Mathematical Software Year : 2014

How do you compute the midpoint of an interval?


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.
Fichier principal
Vignette du fichier
computing-midpoint.pdf (723.53 Ko) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-00576641 , version 1 (15-03-2011)
hal-00576641 , version 2 (17-04-2014)



Frédéric Goualard. How do you compute the midpoint of an interval?. ACM Transactions on Mathematical Software, 2014, 40 (2), ⟨10.1145/2493882⟩. ⟨hal-00576641v2⟩
1114 View
31118 Download



Gmail Mastodon Facebook X LinkedIn More