4

The alert statement alert(parseInt("0x00C02700010004E9",16)); incorrectly displays 54086076498707690 instead of the correct value 54086076498707689. Please notice the last two digits!!

Could anyone shed some light on what am I doing wrong?

terrain
  • 41
  • 1

1 Answers1

4

Yes! Javascript is not accurate to that many digits! See: Large numbers erroneously rounded in Javascript

Community
  • 1
  • 1
Ryan Tenney
  • 1,812
  • 3
  • 16
  • 29