What's this javascript number?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

What's this javascript number?

Post by JellyFish »

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.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: What's this javascript number?

Post by John Cartwright »

3.5957932520658716e+62

add 62 0's infront of 3.5957932520658716e
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: What's this javascript number?

Post by onion2k »

It's scientific notation ... it means 3.5957932520658716 * 10 raised to the power 62. It's a massive number.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: What's this javascript number?

Post by John Cartwright »

Could have sworn I posted a link to scientific notation last night :(
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Re: What's this javascript number?

Post by JellyFish »

Oh I see. But what is e?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: What's this javascript number?

Post by pickle »

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.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: What's this javascript number?

Post by John Cartwright »

Appologies, onion was correct that it was a mistake copying the e
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Re: What's this javascript number?

Post by JellyFish »

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?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: What's this javascript number?

Post by califdon »

e stands for exponent, I believe.
Post Reply