Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 23, 2009, 11:09 PM   #1
daggoth
macrumors newbie
 
Join Date: Jan 2009
Having problems with creating a calculator

.

Last edited by daggoth; Apr 12, 2009 at 10:08 PM.
daggoth is offline   0 Reply With Quote
Old Jan 24, 2009, 07:20 PM   #2
hiddenpremise
macrumors regular
 
Join Date: Jul 2008
Location: Somewhere between my imagination and reality
I'm about 99% sure that you would put in an exponent like 34*10^2
__________________
MBP i7 | iPhone 4 | iPad
hiddenpremise is offline   0 Reply With Quote
Old Jan 24, 2009, 07:41 PM   #3
TotalLuck
macrumors newbie
 
Join Date: Jan 2009
Location: Moreno Vallley
Send a message via Yahoo to TotalLuck
from the kochan bok

(3.31 x 10e8 x + 2.01 x 10e7)
the 'e' can be lower or upper case
__________________
Finding my inner Nerd
NEVER EVER make a drunken bet or you could wind up with a picture like mine.
TotalLuck is offline   0 Reply With Quote
Old Jan 25, 2009, 12:25 AM   #4
autorelease
macrumors regular
 
Join Date: Oct 2008
Location: Achewood, CA
Quote:
Originally Posted by TotalLuck View Post
(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.
autorelease is offline   0 Reply With Quote
Old Jan 25, 2009, 12:48 AM   #5
mdeh
macrumors 6502
 
Join Date: Jan 2009
#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 */
mdeh is offline   0 Reply With Quote
Old Jan 25, 2009, 12:50 PM   #6
TotalLuck
macrumors newbie
 
Join Date: Jan 2009
Location: Moreno Vallley
Send a message via Yahoo to TotalLuck
right

I was only showing the notation not correcting what i "thought" he meant by his expression.
__________________
Finding my inner Nerd
NEVER EVER make a drunken bet or you could wind up with a picture like mine.
TotalLuck is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Similar Threads
thread Thread Starter Forum Replies Last Post
Have Problems with Icons by creating my own theme! howhigh Jailbreaks and iOS Hacks 12 Aug 10, 2010 03:49 PM
Problem with creating CFString subsonix Mac Programming 2 Feb 8, 2010 12:21 AM
Problem with creating a partition "Mac OS Extended (Journaled) msstortuga OS X 4 Oct 5, 2009 09:19 PM
Problems with creating a delegate PPeelen iPhone/iPad Programming 6 Aug 23, 2009 03:44 PM
Odd problem with wifi and Edge - nevermind I see everyones having problems with EDGE pkts iPhone Tips, Help and Troubleshooting 8 Jul 2, 2007 05:12 PM


All times are GMT -5. The time now is 04:36 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC