~/talk

An Introduction To Floating Point Math

Talkat NDC TechTown 2022 · 2022-08-29..09-01· [c-and-cpp]
links:none on file
slides:none on file

Covers why decimal examples like 0.1 + 0.2 != 0.3 and why 20,000,000 + 1 == 20,000,000 happen, explains normalization vs denormals and how absolute vs relative rounding causes non‑associative addition and multiplication, shows guarantees provided by IEEE 754 binary floats, recommends using wider types first and using Kahan summation (≈3× cost) or logarithms for tiny products, compares bitwise/absolute/relative/ulp comparisons, and warns about platform quirks: Intel 80‑bit intermediates, Go/C++ compile‑time vs runtime math, and FPU rounding mode changes.

AI-written summary · about

  1. 0:00Introduction
  2. 3:33Contents
  3. 4:40Why are floats weird
  4. 6:20Scientific notation
  5. 10:33Relative difference
  6. 12:47Decimal flows
  7. 13:56Rounding
  8. 15:13Recap
  9. 16:58Guaranteed Results
  10. 19:57Multiplication
  11. 23:20Comparison
  12. 24:27Bitwise Comparison
  13. 25:03Direct Comparison
  14. 25:59Absolute Margin
  15. 27:35Relative Margin
  16. 28:56Distance
  17. 30:08Relative Distance
  18. 31:11Summary
  19. 32:06Notable Catch 2
  20. 33:30Limitations
  21. 34:24IEEE platforms
  22. 35:26Languages
  23. 35:55Go
  24. 37:33C
  25. 39:55C compilation flags
  26. 40:38External code
  27. 42:35Questions
~/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.