In my JS, I've got a generated number (fairly enormous, it's normally about 95^[5-10]). How do I stop this number from being displayed as standard notation?
Asked
Active
Viewed 37 times
-2
-
3How do you *want* it to be displayed? – gen_Eric May 01 '14 at 16:17
-
In non standard index, e.g. I want `5.6,880,009,227,646e+21` to be displayed as `5,748, 511,570,879,116,626,495` – user3422952 May 01 '14 at 16:25
1 Answers
2
You can't. JavaScript cannot handle such large numbers natively, and the scientific notation helps emphasize that fact.
That said, you might be able to do some string manipulation on it, to strip out the .
and process the exponent to find out how many zeroes to add to the end. Obviously it won't be accurate but that's because of the inability to handle such large numbers I mentioned.

Niet the Dark Absol
- 320,036
- 81
- 464
- 592