What does 1e+24 Chrome console mean?

I noticed that when I type in the chrome console 1000000000000000000000000 it returns me 1e+24.

And when I type 1000000000000000009901591 it also returns me 1e+24 being that 1000000000000000000000000 is different from 1000000000000000009901591

  1. Why does this happen?
  2. and how to differentiate the two?
Author: Silvio Andorinha, 2014-04-01

1 answers

This is an exponential representation. It is not possible to differentiate the two because these numbers extrapolate the maximum accuracy of the numerical type used by javascript, which is below the cloths a type double of the IEEE 754 standard.

The exponential representation works like this:

M e + E = > M × 10 E

M e - E = > M × 10 - E

For the indicated number, we have M = 1, and E = 24 positive. Then the final value it will be:

1 × 1024, that is, 1 followed by 24 zeros.

 11
Author: Miguel Angelo, 2014-04-01 17:32:17