[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: divide by zero problems

In article <bowman-1405991756240001@tl6-218-141.tca.net>,
Kenneth P. Bowman <bowman@null.tamu.edu> wrote:
>>        1
>>     % Program caused arithmetic error: Floating illegal operand
>I thought that by definition NaNs are not a number and hence not equal to
>*anything* else.  Thus the FINITE function.

That's the point. In IEEE math there is no need for a FINITE function.
X eq X is enough to test for NaN.  X EQ !Values.F_NAN should always return
0.  Even if X is NaN. Period.  Excamation point!

If RSI thinks it's not important that IDL be IEEE compliant, they're wrong.
I may consider that bit of non-portability/non-compliance a good reason not
to code for IDL under ANY platform.  


Eric Korpela                        |  An object at rest can never be
korpela@ssl.berkeley.edu            |  stopped.
<a href="http://setiathome.ssl.berkeley.edu/~korpela";>Click for home page.</a>