Twenty five thousand dollars of funny money
Same error as above at Google Ads, or the danger of separating your pennies from your dollars, where $250 internal coupons turned into $25,000. My advice: get rid of integers and floats for monetary values. Use decimals. Or fallback to strings and parse them, don't validate.
- from
- Falsehood
- added
- 2026-10-10
- likes
- 0
similar
-
Decimal Point Error in Etsy's Accounting System web.archive.org
The importance of types in accounting software: missing the decimal point ends up with 100x over-charges.
-
Billed for ¥21,120, invoiced at ¥2,112,000 and paid ¥2,112,000 xunroll.com
Get rid of integers and floats for monetary values. Use decimals. Or face the risks of anomalous x100 charges.
-
Why not use Double or Float to represent currency? web.archive.org
Because of precision: floats and doubles cannot accurately represent the base 10 multiples that we use for money.
-
Never Use Floats for Money husobee.github.io
“This is precisely the problem we have when trying to represent 10^-1, or 0.1 in binary. There is not an exact binary representation of 0.1 or 0.01.”
-
Method to check if you swapped 2 digits news.ycombinator.com
Standard manual accounting trick employed when isolating an error in a double ledger.
-
Falsehood › Business: “Same error as above at Google Ads, or the danger of separating your pennies from your dollars, where $250 internal coupons turned into $25,000. My advice: get rid of integers and floats for monetary values. Use decimals. Or fallback to strings and parse them, don't validate.”