News for hackers. Stuff that matters.
Re:Your balance is $0.30000000004 by ars on Tuesday February 18, 2020 @11:15AM (#22357076)
If you use floats and rounded that one cent would disappear with them as well.

Unless you're storing half cents in their account and not showing it.

Which is perfectly legitimate by the way, because if you earn a fraction of a cent interest accumulated over a couple months that might actually be a cent and you have to pay it.

The solution might be to store everything as 1/100 of a cent, as an integer.

There are no comments on this comment yet.