0.0 ** 2 and pow(0.0,0.5) give different results

Louis Frayser (frayser@Earthlink.NET)
Wed, 23 Apr 1997 00:40:46 -0700 (PDT)


Using ** as the operator for eponentiation on zero gives me NaN,
while pow() works as expected.

Is this a bug in cint?
Come to think of it, ** isn't really c or C++, but it generally seems to
be a substitute for pow().
Does ** work this way (0.0 ** 2 = NaN) in FORTRAN?

Thanks.

root [1] 0.0**2
(double) NaN
root [2] (0.0)**2
(double) NaN
root [3] pow(0.0,.5)
(double)0.000000000000e+00
root [4]

-Louis

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ mailto:frayser@earthlink.net _/ LFrayser@msn.com _/
_/http://www.earthlink.net/~frayser _/ LFrayser@candle.com_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/