~/talk

Printing floating point numbers is surprisingly hard!!

Talkat !!Con 2020 · 2020-05-26..05-28· [compilers-and-language-design]
github:gs0510
slides:none on file

Claim: converting binary floats to the shortest decimal that round-trips is subtle and many languages lack guarantees. The landscape is concrete: Dragon4 is correct but slow, Grisu3 is ~12.5× faster yet fails on a few percent and needs a Dragon4 fallback, and Ryu (2018) cuts work dramatically (roughly 3–5× faster than Grisu3 on tricky cases) while provably producing the shortest round-trippable decimal. The talk demos algorithms, shows the surprising failure counts, and compares performance and fallbacks.

AI-written summary · about

  1. 0:00Floating point printing issues
  2. 1:16Decimal fractions in binary
  3. 3:02Correctness in printing algorithms
  4. 6:23Dragon4 and Grisu3 explained
  5. 9:02Ryu algorithm and solutions
  6. 10:52Challenges in printing floats
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.