How Computers Represent Numbers: Floating Point and Its Surprises
Why does 0.1 plus 0.2 come out as 0.30000000000000004? The answer is not a bug. It is a direct, predictable consequence of how computers store numbers, and knowing it will save you from a whole class of quiet mistakes.
