types - Are there any good javascript currency or decimal classes? -


i trying deal javascript values such 23.45, want able mathematical operations on these values (addition, subtraction, multiplication, division) without running floating point issues. yes, might need round results sometimes, give reasonable answers.

consider in javascript:

24.56 * .3 

yields

7.36799999999 

i come out 7.368.

most languages have either decimal or currency data type deal this. has built class can handle sort of data effectively, or there other solution dealing these sorts of numbers without having adjust floating point errors?

instead of using integers (which have own problems)

i use bignumber.js library


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -