~/talk

Messing with Floating Point

Talkat Core C++ 2024 · 2024-11-26..11-28· [c-and-cpp]
links:none on file
slides:none on file

Walks through IEEE 754 bit layout and shows concrete C++ tools and results: using numeric_limits, nextafter, fe exception APIs and the floating‑point environment, a custom ULP distance (cast to unsigned int), and hexadecimal float literals for exact values. Demonstrates printing 0.1 shows a ~1.5e‑9 representation delta, explains the Patriot missile 500m miss from accumulated 0.1 error, proves Kahan summation fixes a 100M‑random‑float sum where naive summing fails, and sketches float‑to‑decimal and fast inverse square root* algorithms.

AI-written summary · about

  1. 0:00Introduction to floating point
  2. 1:09Floating point basics
  3. 7:52Common floating point pitfalls
  4. 17:05Underflow and denormal numbers
  5. 20:16Floating point comparisons
  6. 23:28Resolution error in addition
  7. 30:15Minecraft floating point quirks
  8. 33:30IEEE 754 standard overview
  9. 38:25Exceptional values in IEEE 754
  10. 40:52Floating point exceptions
  11. 44:21Rounding modes explained
  12. 45:45Arithmetic guarantees of IEEE 754
  13. 52:33Bonus: Float to decimal algorithm
  14. 55:22Bonus: Fast inverse square root
  15. 56:25Hexadecimal float literals
  16. 57:52Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.