Closed SmokeGuap closed 1 month ago
I think this has to do with the MAX_SAFE_INTEGER (9007 1992 5474 0991
< 17th digit number).
Just try console.log(Number(55555555555555555))
and you will get the same result.
For long integers, using string representation of those numbers is better. You can use value from NumberFormatValues
Describe the issue and the actual behavior
After entering 16th digits, the next digit is converted to zero.
Example: Enter 16 digits: 5 555 555 555 555 555 Enter next one 5: 55 555 555 555 555 550
Describe the expected behavior
Example: Enter 16 digits: 5 555 555 555 555 555 Enter next one 5: 55 555 555 555 555 555
Provide a CodeSandbox link illustrating the issue
codesandbox
Provide steps to reproduce this issue
Please check the browsers where the issue is seen