3 ms·
"Monetary value must be stored in integers" is the much stronger statement that the article doesn't make. Obviously there are exceptions, but you're going to ne
by fragmede 4mo ago
"Monetary value must be stored in integers" is the much stronger statement that the article doesn't make. Obviously there are exceptions, but you're going to need a much longer side discussion in order to justify why you're using floats.
It's like saying "don't write your own crypto algorithm". Of course write your own crypto algorithm, that's how you learn about cryptography. But you'd never put your homegrown cryptographic algorithm into production until after several PhDs worth of understanding of cryptography has been put into it by many other people.
- Erem 4mo agoIf you render a number using JavaScript it has been temporarily stored as a doublr. The article was likely allowing for that common use case.
- FabHK 4mo ago[dead]
- fauigerzigerk 4mo ago>"Monetary value must be stored in integers" is the much stronger statement that the article doesn't make. Obviously there are exceptions, but you're going to need a much longer side discussion in order to justify why you're using floats. It doesn't make that statement because arbitrary precision decimals exist. Binary float is not the only and not the most plausible alternative to using integers.