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

Home » Public Forums » archive » Re: the NaN effect :-|
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: the NaN effect :-| [message #54392 is a reply to message #54391] Tue, 12 June 2007 09:42 Go to previous messageGo to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
metachronist wrote:
> On Jun 13, 12:59 am, Paolo Grigis <pgri...@astro.phys.ethz.ch> wrote:
>> metachronist wrote:
>>> [...]
>>> IDL's docu says:
>>> <snip from IDL ref guide: Page 1269/4090>
>>> If the MAX function is run on an array containing NaN values and the
>>> NAN keyword is not set, an invalid result will occur.
>>> </snip>
>>> The same is said for MIN also.
>>> So the result (OPS with MIN/MAX) is directly proportional to the
>>> number of NaN's we eat? er, add to the array? :P
>>> So what is right and what is wrong? Enlighten, please.
>> Why do you expect an "invalid" result to make sense?
>>
>> Ciao,
>> Paolo
>>
> Paolo,
> I know the right way to do is include the NaN keyword, but minus the
> keyword, shouldn't it fail even with single 'NaN' in the array, per
> the documentation? That's what I was wondering. I mean the min and max
> values were "valid" in the first two cases? Am I making sense?

Well, my point was that if something is declared as "invalid", it does
not means "it is always wrong", rather that "it is *not* always right",
and therefore one should treat *all* the results as suspect to be on
the safe side (of course this is a simple example, in other cases it
may be less obvious).

Of course it is nice to know the rationale (see Lajos' post).

Ciao,
Paolo

> /rk
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: defining a data structure
Next Topic: Dealing with Large data arrays, reducing memory and ASSOC

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

Current Time: Sat Oct 11 01:53:45 PDT 2025

Total time taken to generate the page: 0.95831 seconds