Hacker News new | ask | show | jobs
by treve 2521 days ago
The issue is more obvious when rounding something like 0.5, which, due to lack of precision can become either 0 or 1.

Shameless plug: use https://www.npmjs.com/package/bigint-money