And lastly, what is the best way to make sure curr...
# suitescript
k
And lastly, what is the best way to make sure currency values with several decimal places get calculated accurate when doing math on them?
b
If you are serious about rounding errors, you use a library like decimal.js or bignumber.js to do your math
otherwise you hope the floating number gods are in your favor and just set your number (or perhaps use .toFixed on it)
k
Yeah, I'm painstakingly going through line by line and changing every number to Math(myNumber*100)/100 at the moment.
a
Rounding with exponentials in the way to go in JavaScript