Key 0.1 + 0.2 and the display answers 0.3. Key 0.1 + 0.2 − 0.3 and it answers 5.5511151231258⋅10−17. The subtraction is the honest one: the stored sum sits a few units above 0.3 in the seventeenth decimal place, and the plain sum only looks correct because the print rounds to fewer digits than the error needs to show itself.
Neither 0.1 nor 0.2 has an exact binary form — they are repeating expansions, the way 1/3 is in decimal — so the machine keeps the nearest representable value of each, and the two roundings do not cancel. This is why money is handled as integer cents, why equality tests on computed decimals are a bug, and why the residue is about 5.6 × 10⁻¹⁷ rather than the 2.2 × 10⁻¹⁶ that machine epsilon alone would predict: two roundings, one subtraction.
Answer
5.5511151231258⋅10−17
How to read it
The residue after 0.1 + 0.2 − 0.3. The two-term version prints 0.3 because the display rounds before you can see the gap.
Source
0.1 and 0.2 are repeating fractions in binary; the residue is documented in the Python tutorial's floating-point section and in IEEE 754 itself
Work it in the calculator
These links open the right calculator with this problem's numbers already typed in. The line above is what the screen should show — check it yourself.