Why this matters
The bug. 0.1 has no exact binary representation. Two computations that look algebraically equal often differ by ~1e-16, and == returns false.
The fix. math.isclose (Python 3.5+) handles relative + absolute tolerance correctly. For currency specifically, use decimal.Decimal or *integer cents* — never floats.
Real horror story. Patriot missile timing bug, 1991: 0.1-second drift over 100 hours of operation, traced to repeated float arithmetic.
Review heuristic
Money in a float or double is a bug. Equality on a float is a bug. Accumulation in a long-running average without a corrective term is a slow-burning bug. Each one needs a deliberate justification or a type change.
External reference: CWE-682: Incorrect Calculation.