I try to get
Math.pow(2,1000);
The result is " 1.2676506002282294e+30 "
I need the number without Euler's number "e+30"
I try to get
Math.pow(2,1000);
The result is " 1.2676506002282294e+30 "
I need the number without Euler's number "e+30"
With very large numbers, JavaScript displays them in scientific notation. This is because it is very expensive and unreadable to list them.
For your example, it basically means
1.2676506002282294 * 10 ^ 30
You take the number and then multiply it by 10 to the 30th power.
Calculators often use "E" or "e" like this: 1.8004E+94
6E+5 is the same as 6 × 10^5
To get it without this notation, simply use smaller numbers as the exponent.
Example: Math.pow(2,10)
Mathisfun provides an excellent article on scientific notation. Check it out here
https://www.mathsisfun.com/numbers/scientific-notation.html
Euler's number is a constant that is the base of a natural number. It's an irrational number, meaning its digits go on forever. The first couple digits are 2.7182818284
That's scientific notation, not Euler's number.
If you want to show the number without the e+NN
part:
e+NN
partbe aware that doing so will lead to inaccurate values for some calculations due to how floating point arithmetic works.