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

Similar Threads
thread Thread Starter Forum Replies Last Post
Geektool: Problems creating my first custom script kiercardo UI Customization 3 Feb 5, 2014 04:24 AM
Problems creating my own server jcmoney1010 Mac OS X Server, Xserve, and Networking 4 Jul 19, 2013 12:19 PM
problems creating outlets in header files through dragging blue-lion iPhone/iPad Programming 1 May 13, 2013 05:15 PM
Help with creating a mortgage calculator in Jquery bigMAC28 Web Design and Development 5 Apr 19, 2013 05:10 AM
Crazy Calculator Full--Change the way you use calculator wwssttt iPad Apps 0 Dec 30, 2012 06:37 AM

Forum Jump

All times are GMT -5. The time now is 04:25 AM.

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

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