An Emacs-Cairo Scrolling Bug due to Floating-Point Inaccuracy - Inria - Institut national de recherche en sciences et technologies du numérique
Pré-Publication, Document De Travail Année : 2024

An Emacs-Cairo Scrolling Bug due to Floating-Point Inaccuracy

Résumé

We study a bug that we found in the GNU Emacs text editor when built against the Cairo graphics library. We analyze both the Emacs code and the Cairo code, and we suggest what can be done to avoid unexpected results. This involves a particular case with a computation that can be reduced to the equivalent floating-point expression ((1/s)·b)·s, where s and b are small positive integers such that b < s and the basic operations are rounded to nearest. The analysis takes into account the values of s and b that can occur in practice, and the suggestions for workarounds must avoid handling this particular case in a separate branch or breaking the structure of the Cairo library (so that just returning b is not possible).
Fichier principal
Vignette du fichier
arith31.pdf (90.41 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)
Licence

Dates et versions

hal-04566768 , version 1 (02-05-2024)

Licence

Identifiants

  • HAL Id : hal-04566768 , version 1

Citer

Vincent Lefèvre. An Emacs-Cairo Scrolling Bug due to Floating-Point Inaccuracy. 2024. ⟨hal-04566768⟩
47 Consultations
70 Téléchargements

Partager

More