[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: where() and IEEE NaN
- Subject: Re: where() and IEEE NaN
- From: thompson(at)orpheus.nascom.nasa.gov (William Thompson)
- Date: 5 Nov 1999 22:15:43 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA
- References: <7vv1j3$6ro$1@ra.nrl.navy.mil> <7vv5ot$573$1@agate.berkeley.edu> <7vv7bd$ifa$1@news.smart.net>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:17130
badastro@smart.net (Philip Plait) writes:
> 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
>Incidentally, if you are looking for the element numbers
>of where a = NaN, try:
>IDL> print,where(a-a ne 0)
> 2 4
Isn't it simpler (and faster) to say
IDL> print,where(a ne a)
William Thompson