Hacker News new | ask | show | jobs
by chongli 1817 days ago
Using float for currency calculations is how you accumulate a bunch of rounding errors. Standard practice when dealing with money is to use an arbitrary-precision numerical type.