Re:64-Bit Bank Balances ‘Ought to Be Enough for Anybody’?
by masklinn on Tuesday September 19, 2023 @12:11PM
(#37572078)
Really small can be an issue when it gets really small e.g. tarsnap’s accounting is pretty infamously done in attodollars (1e-12). U64 only has room for 19 decimal digits so you’re limited to 7 figures up.
[ Parent
| on HN ]
Re:64-Bit Bank Balances ‘Ought to Be Enough for Anybody’?
by cperciva on Tuesday September 19, 2023 @02:36PM
(#37574216)
Tarsnap's pricing is in picodollars (1e-12) but the accounting is attodollars (1e-18). Tarsnap uses 128-bit balances -- 64 bits of attodollars and 64 bits of whole dollars.
If I ever have someone paying me more than 2^64 dollars, I'll rewrite Tarsnap's accounting system.