Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-26-2008, 05:50 AM   PM User | #1
BubikolRamios
Senior Coder

 
Join Date: Dec 2005
Location: Slovenia
Posts: 1,876
Thanks: 114
Thanked 76 Times in 76 Posts
BubikolRamios is on a distinguished road
2*10e-11 --> 2*10e-10 ?

this

Code:
alert(2*10e-11);
alerts: 2*10e-10

?
BubikolRamios is offline   Reply With Quote
Old 04-26-2008, 06:37 AM   PM User | #2
Trinithis
Regular Coder

 
Join Date: Jun 2007
Location: USA
Posts: 527
Thanks: 26
Thanked 74 Times in 72 Posts
Trinithis will become famous soon enough
Code:
1e2 = 1 * (10 ^ 2)
Basically, the e already includes the 10 in the times part.

In your example,

Code:
2*10e-11 
   = 2 * 10 * (10 ^ -11)
   = 2 * (10 ^ (-11 + 1))
   = 2 * (10 ^ -10)
   = 2e-10

   (which is what js alerts)
Trinithis is offline   Reply With Quote
Old 04-26-2008, 06:41 AM   PM User | #3
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
Yes...it's correct

...This means that 10 is raised to the power of -11 which is 0.0000000001

The output above is exactly the same as:
Code:
alert(2*0.0000000001);
Edit: Trinithis types fastly as the chimpanzee
__________________
Learn how to javascript at 02geek

The more you learn, the more you'll realize there's much more to learn
Ray.ph
rangana is offline   Reply With Quote
Old 04-26-2008, 07:29 AM   PM User | #4
Trinithis
Regular Coder

 
Join Date: Jun 2007
Location: USA
Posts: 527
Thanks: 26
Thanked 74 Times in 72 Posts
Trinithis will become famous soon enough
The question is . . . do chimpanzee's type fast?
Trinithis is offline   Reply With Quote
Old 04-26-2008, 07:41 AM   PM User | #5
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
NOt as fast as you do
__________________
Learn how to javascript at 02geek

The more you learn, the more you'll realize there's much more to learn
Ray.ph
rangana is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:59 AM.


Advertisement
Log in to turn off these ads.