PDA

View Full Version : A couple of mathematical questions




Jeremy1026
Sep 1, 2008, 11:49 AM
I have a few questions on how to evaluate some mathematic stuff in Obj-C.

1st - How would I evaluate the square root of a number?

2nd - How would I evaluate logarithms?

3rd - I'd assume the way to deal with exponents would be using a carrot (^)?


Thanks in advance for any help provided.



Cromulent
Sep 1, 2008, 11:53 AM
Are these actual mathematical questions (i.e how to do it) or programming questions (how to implement it)?

Jeremy1026
Sep 1, 2008, 11:56 AM
Are these actual mathematical questions (i.e how to do it) or programming questions (how to implement it)?

How do I implement it.

Cromulent
Sep 1, 2008, 12:00 PM
Look into the following functions:

pow()
log()
sqrt()

should give you everything you need.

Jeremy1026
Sep 1, 2008, 12:02 PM
Look into the following functions:

pow()
log()
sqrt()

should give you everything you need.

Thank you very much, that is exactly the information I was looking for.