News for hackers. Stuff that matters.
Re:Dinero.js – JavaScript library for working with monetary ... by Vindicis on Tuesday April 17, 2018 @10:20AM (#16858530)
Basically, you store everything as integers.You can specify whatever precision you want, just by saying x digits are before the decimal. E.g. 1.234566 is 1234566. Rounding when needed(just be consistent), but you never round until the last step which is when you're going to be displaying/storing the final value.

There are no comments on this comment yet.