Why your computer can't store 0.2: an IEEE 754 primer

Franc0Fernand0 · x · 2026-10-16

A concise explainer of floating-point basics: binary can only exactly represent integers times a power of two, so 0.2 expands to the infinite sequence 0.00110011… (like 1/3 in decimal) and must be truncated and rounded.

The author breaks down the IEEE 754 layout — sign, exponent, and fraction with a hidden leading 1 — where the exponent buys range and the fraction determines how many digits you can trust; the rest gets rounded.

The tweet promotes issue #195 of the Polymathic Engineer newsletter, which covers why the point must float, fractions in binary, normalized/denormalized and special values, and rounding.

Original post →

More from Infra

Infra channel →