comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Math Question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Math Question [message #51120] Sun, 29 October 2006 08:02
David Fanning is currently offline  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.")
[Message index]
 
Read Message
Previous Topic: meshgrid function
Next Topic: Re: meshgrid function

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 05:17:09 PDT 2025

Total time taken to generate the page: 0.96023 seconds