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

Home » Public Forums » archive » Re: Comparison operators and floating-point errors
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: Comparison operators and floating-point errors [message #70554 is a reply to message #70553] Mon, 19 April 2010 14:24 Go to previous messageGo to previous message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
On Apr 19, 1:36 pm, Craig Markwardt <craig.markwa...@gmail.com> wrote:
> Right.  Try setting NAN=0.0/0.0 or NAN=!values.f_nan.

OK, so for the purpose of masking an array with a binary mask, I had
been using

MASKED_DATA = DATA / FLOAT(MASK)

and should instead use

MASKED_DATA = (DATA * MASK) / FLOAT(MASK)

in order to ensure that the masked values are all NaN.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Comparison operators and floating-point errors
Next Topic: Re: Declaring large vectors in IDL

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

Current Time: Fri Oct 10 09:29:43 PDT 2025

Total time taken to generate the page: 0.96347 seconds