x^y = exp(y * ln (x)). You then need MathLib. Cordially, Regis.
------------------------------------------------------------------------ Regis NICOLAS - Engineering Director, Montpellier Site Palm Computing Europe, a PalmSource, Inc. subsidiary When the finger points to the sky, the idiot looks at the finger. -----Original Message----- From: Vinay Vinay [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 8:50 AM To: Palm Developer Forum Subject: Re: to the power function? Hi, Thanks for your reply, what if I want to raise the power by fractions, say for exapmle Pow(2, 0.5), it will return 1 all the times, if you have any solution the plese tell me. Thanks >From: Lally Singh <[EMAIL PROTECTED]> >Reply-To: "Palm Developer Forum" <[EMAIL PROTECTED]> >To: "Palm Developer Forum" <[EMAIL PROTECTED]> >Subject: Re: to the power function? >Date: Sat, 27 Jul 2002 09:15:57 -0400 > >On 7/27/02 5:10 AM, "Vinay Vinay" <[EMAIL PROTECTED]> wrote: > > > Hi, > > Is there any function which gives you to the power result, like in c++ > > pow(). > >calculates v^exp. > >double pow(double v, int exp) { > double ttl = 1; > while (exp) { > if (exp & 1) > ttl *= v; > v*=v; > exp >>=1; > } > return ttl; >} > > > >-- >For information on using the Palm Developer Forums, or to unsubscribe, >please see http://www.palmos.com/dev/support/forums/ _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
