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 #43703 is a reply to message #43584] Sat, 23 April 2005 12:48 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning wrote:

> 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

I got the same result without the warnings on the linux Version.
Probably we both should try it with the actual 6.1.1 version. For windows
it's a 2MB download and I don't know why it is for linux 60MB. ;-)

cheers

Reimar



--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
[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: Fri Nov 28 21:11:49 PST 2025

Total time taken to generate the page: 0.47709 seconds