# to the nth power

Rajiv Mirani mirani-rajiv at cs.yale.edu
Fri Nov 2 09:27:06 AEST 1990


In article <15984 at mentor.cc.purdue.edu> edgincd2 at mentor.cc.purdue.edu (Chris Edgington *Computer Science Major*) writes:
>In article <90305.005050CJH101 at psuvm.psu.edu>, CJH101 at psuvm.psu.edu (Carl J. Hixon) writes:
>> I appologize for bothering you computer wizards with such an elementary
>> question but, I'm floundering.  Why am I unable to find an opperator which
>> raises a number to a power. (The fortran equivalent of x**n)  Is there such
>
>I don't know if this is what you are looking for, but this is a neat little
>trick to take a number to a power.
>
>     Answer = exp(ln(Root)*Exponent);
>
>Chris Edgington

Assuming, of course, that Root is positive.

--Rajiv



More information about the Comp.lang.c mailing list