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

Re: where() and IEEE NaN

In comp.lang.idl-pvwave Eric J. Korpela <korpela@islay.ssl.berkeley.edu> wrote:
> In article <7vvkuf$hk4@post.gsfc.nasa.gov>,
> William Thompson <thompson@orpheus.nascom.nasa.gov> wrote:
> >Isn't it simpler (and faster) to say
> >
> >	IDL> print,where(a ne a)

> It is on IEEE compliant platforms.  But IDL on some platforms
> is not IEEE compliant.  My solution is not to use those platforms.

I had a DEC Alpha for a few years that some, um, interesting
effects in IDL. I'm on a sparc now and have no problems. 
I cannot remember the details now, but a couple of years ago we had
this NaN problem. I typed in print,where(a ne a) and it barfed. So
I did the workaround of hh = where(a-a ne 0) and it worked.

*    *    *    *    *    The Bad Astronomer    *    *    *    *

Phil Plait                    badastro@badastronomy.com
The Bad Astronomy Web Page: http://www.badastronomy.com