Precision Matters: Why Using Cents Instead of Floating Point for Transaction Amounts is Crucial
hackerone.com | blog | #engineering | #finance | #security | #precision | #floating-point | #transactions
Summary
Explains why storing transaction amounts as integer cents is safer than floating-point dollars, covering rounding errors and precision pitfalls in financial code.
- Published
- Collected
--- id: 1987 title: "Precision Matters: Why Using Cents Instead of Floating Point for Transaction Amounts is Crucial" source_domain: hackerone.com source_url: "https://www.hackerone.com/blog/precision-matters-why-using-cents-instead-floating-point-transaction-amounts-crucial" published_at: "2024-01-08T10:49:26Z" tags: ["engineering", "finance", "security", "precision", "floating-point", "transactions"] phying_url: "https://phying.com/item/1987" lang: en --- # Precision Matters: Why Using Cents Instead of Floating Point for Transaction Amounts is Crucial ## Summary Explains why storing transaction amounts as integer cents is safer than floating-point dollars, covering rounding errors and precision pitfalls in financial code. ## Intelligence Metadata - **Sources:** hackerone.com - **Published:** 2024-01-08T10:49:26Z - **Original:** https://www.hackerone.com/blog/precision-matters-why-using-cents-instead-floating-point-transaction-amounts-crucial - **Phying News:** https://phying.com/item/1987