v-money
v-money copied to clipboard
Not working with big Integer
I tried the sample code mentioned in the docs: https://jsfiddle.net/auom8st8/ When I try to enter a large number (the number of digits is greater than 18), the result is displayed incorrectly Is there a way to solve the problem with user input numbers too large?
Hello @minhhoang121296,
I created a version based on this repository with several previous repairs and adding "spinners" (these can be disabled), apparently I also have this problem when I reach 22 digits (the number of digits is reset to 18), I don't know if you mean this? you can try it? https://joserick.com/v_money_spinner
@minhhoang121296 @joserick
The
MAX_SAFE_INTEGER
constant has a value of9007199254740991
(9,007,199,254,740,991 or ~9 quadrillion). The reasoning behind that number is that JavaScript uses double-precision floating-point format numbers as specified in IEEE 754 and can only safely represent numbers between -(253 - 1) and 253 - 1.
I dont think this is a bug: https://github.com/joserick/v-money-spinner/issues/8