[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: where() and IEEE NaN
- Subject: Re: where() and IEEE NaN
- From: davidf(at)dfanning.com (David Fanning)
- Date: Fri, 5 Nov 1999 11:23:42 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <7vv1j3$6ro$1@ra.nrl.navy.mil>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:17119
Todd Bowers (tbowers@nrlssc.navy.mil) writes:
> 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?
Sure. Well known. :-)
I usually check for NANs like this:
IDL> Print, Where( NOT Float( Finite(a) ) )
2 4
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155