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

Re: where() and IEEE NaN



In article <7vv1j3$6ro$1@ra.nrl.navy.mil>,
Todd Bowers <tbowers@nrlssc.navy.mil> wrote:
>IDL> a = [1,2,!Values.F_NaN,4,!Values.F_NaN]
>IDL> print, a
>      1.00000      2.00000          NaN      4.00000          NaN
>IDL> print, where(a EQ !Values.F_NaN)
>           0           1           2           3           4
>
>Hmmmmmm.... is this a known feature? The where() help says
>nothin' about NaN's.
>IDL v5.2a

Unfortunately, on some platforms IDL is not IEEE compliant which greatly
limits IDL's usefulness as a cross platform system.  RSI could easily fix
this on most platforms with a compiler option, but they choose not to.
The only correct response for any array to "print,where(a eq !values.F_NaN)"
is "-1".

Eric

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