Hall of FameDavid Goldberg1991127 min readpaperintermediate
What Every Computer Scientist Should Know About Floating-Point Arithmetic
Summary
The paper is a thorough tutorial on floating‑point representation, rounding error, and the IEEE‑754 standard, explaining how numbers are encoded and why errors arise. It shows how guard digits, denormals, NaNs, and exact operation algorithms affect portability and performance.
- Floating‑point numbers consist of sign, exponent, and significand; normalized form makes representations unique but requires a special encoding for zero.
- Rounding error is quantified by ulps and relative error; guard digits mitigate catastrophic cancellation in subtraction.
- IEEE‑754 defines exact algorithms for basic operations, guaranteeing bit‑identical results on compliant hardware.
- Denormalized numbers, infinities, and NaNs handle underflow/overflow but can impact performance and exception handling.
Anyone building numerical software, compilers, or hardware needs these fundamentals to avoid subtle bugs and ensure portable, reliable results.
6/10
