Path: utzoo!utgpu!watserv1!watmath!att!att!rutgers!usc!sdd.hp.com!samsung!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: # to the nth power Message-ID: <4200@goanna.cs.rmit.oz.au> Date: 5 Nov 90 04:12:46 GMT References: <90305.005050CJH101@psuvm.psu.edu> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 14 In article , prk@planet.bt.co.uk (Peter Knight) writes: > The likely offered solutions in C, involving ln()/exp() or the pow() functions > are not going to be a capable as Fortran's x**n. These functions cannot cope > with Fortran legal operations like (-1e6)**10. This claim is false. C's pow() function is precisely as capable as Fortran's ** operator. In particular, #include ... x = pow(-1.0e6, (double)10); will set x to 1.0e60. pow() checks for integral exponents. -- The problem about real life is that moving one's knight to QB3 may always be replied to with a lob across the net. --Alasdair Macintyre.