Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with big Integer #103

Open
minhhoang121296 opened this issue Aug 11, 2020 · 2 comments
Open

Not working with big Integer #103

minhhoang121296 opened this issue Aug 11, 2020 · 2 comments

Comments

@minhhoang121296
Copy link

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?

@joserick
Copy link

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

@jonathanpmartins
Copy link

jonathanpmartins commented May 3, 2021

@minhhoang121296 @joserick

The MAX_SAFE_INTEGER constant has a value of 9007199254740991 (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.

From Mozilla Javascript Docs

I dont think this is a bug: joserick/v-money-spinner#8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants