comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » NaN problems
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: NaN problems [message #43725 is a reply to message #43584] Fri, 22 April 2005 20:38 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Y.T. writes:

> I don't have access to IDL on a win-box, but I have a (potentially
> stupid) question: On that page of yours where you write
>
> IDL> print, array ne array
> 0 0 0 0 0
>
> have you tried the converse, i.e.
>
> IDL> print, array eq array
>
> ?
>
> I am asking since, while it is true that a NaN is not equal to a NaN it
> does not seem to follow (to my wrinkled brain) that a NaN is
> necessarily UNequal to a NaN.
>
> In your version you test for the latter, and I'm kinda curious what
> would happen if you tried the former...

Well, looks like some things have changed since that
article was written. Here is what I get in IDL 6.1 on Windows:

IDL> a = [ 1.0, 2.0, !Values.F_NAN, 4.0, !Values.F_NAN ]
IDL> print, a ne a
0 0 1 0 1
% Program caused arithmetic error: Floating illegal operand
IDL> print, a eq a
1 1 0 1 0
% Program caused arithmetic error: Floating illegal operand

Consistent, anyway. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: NAN Problem
Next Topic: Re: aggregate pixel values within shapes or another raster

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 20:51:29 PDT 2025

Total time taken to generate the page: 0.56016 seconds