• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Math question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Math question


  • Subject: Re: Math question
  • From: "John C. Randolph" <email@hidden>
  • Date: Sat, 1 Sep 2001 19:39:09 -0700

On Saturday, September 1, 2001, at 05:14 PM, Vince DeMarco wrote:


On Saturday, September 1, 2001, at 04:27 pm, John C. Randolph wrote:

On Saturday, September 1, 2001, at 02:34 PM, email@hidden wrote:

Hello all. i have a question about math in Cocoa. how do i do higher level math? obviously i can do the basics */+-% without problem. but what about doing things like raising a number to a power?

fooSquared = foo^2;

For other math functions in the C standard library, open a terminal window and type "man math".

Try again foo^2 is foo XOR 2.

Oops! I had a FORTRAN flashback for a moment there..

Make that

fooSquared = pow(foo, 2);

-jcr

"The problem with trying to child-proof the world, is that it makes people neglect the far more important task of world-proofing the child." -- Hugh Daniel


References: 
 >Re: Math question (From: Vince DeMarco <email@hidden>)

  • Prev by Date: Re: Math question
  • Next by Date: Re: Math question
  • Previous by thread: Re: Math question
  • Next by thread: Re: Math question
  • Index(es):
    • Date
    • Thread