News for hackers. Stuff that matters.
Re:Fintech Engineering Handbook by fragmede on Saturday June 27, 2026 @03:57PM (#48701188)
"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.

Re:Fintech Engineering Handbook by Erem on Saturday June 27, 2026 @09:49PM (#48703569)
If you render a number using JavaScript it has been temporarily stored as a doublr. The article was likely allowing for that common use case.
Re:Fintech Engineering Handbook by fauigerzigerk on Sunday June 28, 2026 @08:04AM (#48706614)
>"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.