An Emacs-Cairo Scrolling Bug due to Floating-Point Inaccuracy - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Preprints, Working Papers, ... Year : 2024

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

Abstract

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
Origin Files produced by the author(s)
Licence

Dates and versions

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

Licence

Identifiers

  • HAL Id : hal-04566768 , version 1

Cite

Vincent Lefèvre. An Emacs-Cairo Scrolling Bug due to Floating-Point Inaccuracy. 2024. ⟨hal-04566768⟩
0 View
0 Download

Share

Gmail Mastodon Facebook X LinkedIn More