What's this javascript number?
Moderator: General Moderators
What's this javascript number?
3.5957932520658716e+62
What does this mean? What's e?
Have you ever seen this number pop up in javascript? Usually it pops up when you have to large of a number. But how is it a large number?
Thanks for reading.
What does this mean? What's e?
Have you ever seen this number pop up in javascript? Usually it pops up when you have to large of a number. But how is it a large number?
Thanks for reading.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: What's this javascript number?
3.5957932520658716e+62
add 62 0's infront of 3.5957932520658716e
add 62 0's infront of 3.5957932520658716e
Re: What's this javascript number?
It's scientific notation ... it means 3.5957932520658716 * 10 raised to the power 62. It's a massive number.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: What's this javascript number?
Could have sworn I posted a link to scientific notation last night 
Re: What's this javascript number?
Oh I see. But what is e?
Re: What's this javascript number?
e is just part of the notation. I believe ~Jcart errantly copied it.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: What's this javascript number?
Appologies, onion was correct that it was a mistake copying the e
Re: What's this javascript number?
Oh I see. So why "e"?
Why didn't ECMA do something more like: 3.5957932520658716^62 that is, 3.5957932520658716 raised to the power of 62. Or something like that?
Why didn't ECMA do something more like: 3.5957932520658716^62 that is, 3.5957932520658716 raised to the power of 62. Or something like that?
Re: What's this javascript number?
e stands for exponent, I believe.