javascript - parseInt changes the integer -
I am trying to draw a number (721576481415319 78 ), which is 21 characters Begins with the title of such a page: This string gives the integer as 721576481415319 80 . I can not seem to know why this is changing the last two numbers. Any help would be appreciated. According to the maximum value of an integer is 9007199254740992. I tried your calculation and I can confirm your problem. It looks like parsing beyond this maximum value and it is rounding the previous 2 figures.
parseInt (document.title.substring (21), 10);
Comments
Post a Comment