Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!caen!ox.com!yale!cs.yale.edu!mirani-rajiv From: mirani-rajiv@cs.yale.edu (Rajiv Mirani) Newsgroups: comp.lang.c Subject: Re: # to the nth power Message-ID: <27013@cs.yale.edu> Date: 1 Nov 90 22:27:06 GMT References: <90305.005050CJH101@psuvm.psu.edu> <15984@mentor.cc.purdue.edu> Sender: news@cs.yale.edu Organization: Yale University Computer Science Dept., New Haven, CT 06520-2158 Lines: 16 Nntp-Posting-Host: bass.zoo2.cs.yale.edu Originator: mirani@bass.CS.Yale.Edu In article <15984@mentor.cc.purdue.edu> edgincd2@mentor.cc.purdue.edu (Chris Edgington *Computer Science Major*) writes: >In article <90305.005050CJH101@psuvm.psu.edu>, CJH101@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