Issue
I'm using Number() to convert an input into number and it is returning the wrong number.
Couldn't find a reason for this:
const aux = Number("3721250857372431234");
console.log(aux)
it will print 3721250857372431400 instead of 3721250857372431234
Solution
Your number is bigger than the maximum safe integer and therefore the precision cannot be guaranteed.
Answered By - JRose
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.