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

Home » Public Forums » archive » Re: Interesting Filled Contour Problem
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: Interesting Filled Contour Problem [message #79897 is a reply to message #79893] Tue, 17 April 2012 04:54 Go to previous messageGo to previous message
Carsten Lechte is currently offline  Carsten Lechte
Messages: 124
Registered: August 2006
Senior Member
On 17/04/12 05:21, Craig Markwardt wrote:
> NAN OP X
> will always result in a value of NAN, for all operations OP and for all operands X

Unless that OP is a comparison operator; then the result is always
false, i.e. NAN eq NAN is false etc.

> Strangely,
> NAN< 0
> produces NAN, so apparently NAN is a negative number (!!!).

You jest, but what is happening is this:

IDL> print, asdf, asdf GT 0, asdf LT 0, asdf < 0, asdf > 0
-1.0000000 -NaN NaN 1.0000000
0 0 0 1
1 0 0 0
-1.0000000 -NaN NaN 0.0000000
0.0000000 0.0000000 0.0000000 1.0000000

It seems like "asdf < 0" zeros those elements WHERE( asdf gt 0), i.e.
element 3, while "asdf > 0" uses the COMPLEMENT of WHERE( asdf gt 0),
i.e. [0,1,2], instead of zeroing WHERE( asdf LT 0), i.e. [0].

Unexpected, inconsistent, yet conforming to IEEE.


chl
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: TOA (Time of Arrival)
Next Topic: Coyote's Guide to IDL Programming now in Armenian!

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

Current Time: Wed Oct 08 19:25:14 PDT 2025

Total time taken to generate the page: 0.00445 seconds