Floating point can't represent 0.10 exactly. DECIMAL(12,2) in SQL and decimal.Decimal in Python keep cents exact. Casting text to a decimal type may round silently, so validate the text first.
- Lesson: Exact decimals for money
- Practise: Flag large transactions, keep refunds
Related: Rounding (half-even), Locale