A couple of mathematical questions

Discussion in 'iOS Programming' started by Jeremy1026, Sep 1, 2008.

  1. macrumors 68000

    Joined:
    Nov 3, 2007
    #1
    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.
     
  2. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    Are these actual mathematical questions (i.e how to do it) or programming questions (how to implement it)?
     
  3. thread starter macrumors 68000

    Joined:
    Nov 3, 2007
    #3
    How do I implement it.
     
  4. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    Look into the following functions:

    pow()
    log()
    sqrt()

    should give you everything you need.
     
  5. thread starter macrumors 68000

    Joined:
    Nov 3, 2007
    #5
    Thank you very much, that is exactly the information I was looking for.
     

Share This Page