I've choosen accounting.js as my formating / rounding js lib. According to homepage, toFixed solves js rounding inconsistencies as we expect base 10 classical rounding for monetary values.
Now after some time in production bugs started to appear because it fails to deliver what it promises:
Of course bugs happen in the best projects, but misleading potential users with bad info in the home page when now I see that there are bugs reports about this months ago is no fun.
I've choosen accounting.js as my formating / rounding js lib. According to homepage, toFixed solves js rounding inconsistencies as we expect base 10 classical rounding for monetary values.
Now after some time in production bugs started to appear because it fails to deliver what it promises:
accounting.toFixed(158.605, 2) = 158.60 accounting.toFixed(259.605, 2) = 259.61
Of course bugs happen in the best projects, but misleading potential users with bad info in the home page when now I see that there are bugs reports about this months ago is no fun.