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:

  parseInt (document.title.substring (21), 10);   

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.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -