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 #54391] Tue, 12 June 2007 09:45 Go to previous message
Conor is currently offline  Conor
Messages: 138
Registered: February 2007
Senior Member
On Jun 12, 12:11 pm, metachronist <rkombi...@gmail.com> 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?
> /rk


I think what Paolo was implying (and what the documentation also
implies) is not that an error is returned, but that the result itself
is invalid - i.e. wrong. Just because the result is invalid doesn't
mean that an error will be returned, and it doesn't mean that the
result might not be correct sometimes. It just means that you
shouldn't use it :)
[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: Wed Oct 08 15:54:27 PDT 2025

Total time taken to generate the page: 0.01625 seconds