Someone else has already noted this: Don't use the native Javascript Number type for calculations involving currency. There's some great reading available online on this subject.[1][2] There are various libraries around that can facilitate precise decimal arithmetic in Javascript. A well known one is BigNumber.js ( https://mikemcl.github.io/bignumber.js/ ) A great quote that I found on StackOverflow regarding this is…
At least in the US, tax calculations may round all inputs to the nearest whole dollar. https://www.taxact.com/support/14396/2017/forms-w-2-or-1099-...
Aww....