3 ms·
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
by ars 7y ago
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.