Math Question [message #51120] |
Sun, 29 October 2006 08:02 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
OK, I get the feeling that I am going to be referred to
my own web page with this question:
http://www.dfanning.com/math_tips/sky_is_falling.html
And it is certainly true that I have been watching WAY
too much TV lately (World Series, you know), but here is
my question. How does one explain the following two
IDL commands?
IDL> Help, (-0.1)^2.0
<Expression> FLOAT = 0.0100000
IDL> Help, (-0.1)^2.01
<Expression> FLOAT = -NaN
In general, raising a negative number to any integer
power seems to produce a real number, whereas raising
a negative number to a non-integer power causes a NAN.
I am sure this is explained in one of those textbooks
covered with dust in my garage, but I thought one of
you math guys could rescue me from a beautiful day
spent covered with dust. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|