Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

autorelease

macrumors regular
Oct 13, 2008
144
0
Achewood, CA
(3.31 x 10e8 x + 2.01 x 10e7)
the 'e' can be lower or upper case

Actually, that's not correct. The 'e' means "times 10 to the power of", so if you say 10e8, you're actually saying "10 times 10 to the 8th power", which is 10 to the 9th power--not what you want.

You shouldn't use the multiplication operator at all: just type "3.3e8," "2.01e-7", etc.
 

mdeh

macrumors 6502
Jan 3, 2009
345
2
#import <Foundation/Foundation.h>

int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

// insert code here...
NSLog(@"%g",(3.31e-8 + 2.01e-7) / (7.16e-6 + 2.01e-8) );
[pool drain];
return 0;
}

/* 0.032604 */
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.