News for hackers. Stuff that matters.
Re:Engineers' Billing Nightmares by twelve40 on Monday November 28, 2022 @08:27AM (#33773354)
> "Integer number of cents" is a fine way to deal with money unless you want sub-cent units

I use this approach to minimize the amount of time I have to waste on trivial money operations such as storage and api's, but this approach (number of cents) falls apart quickly the moment you need to do something as simple as calculate tax or a commission. So, still likely no getting around proper float math even if you may not really be all that interested in sub-cent units.

There are no comments on this comment yet.