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

Home » Public Forums » archive » Re: Philosophical Question about NAN
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: Philosophical Question about NAN [message #63759 is a reply to message #63742] Mon, 17 November 2008 07:54 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Nov 17, 9:58 am, David Fanning <n...@dfanning.com> wrote:
> Folks,
>
> I've had a couple of run-ins lately with NANs and I wonder
> why routines like TOTAL and MEAN don't have the NAN keyword
> set to 1 by default. Why does the user have to set it?

I agree with the sentiment but also note that always setting /NAN
incurs a non-trivial performance penalty, e.g.

IDL> a = randomn(seed,10000,2000)
IDL> t = systime(1) & b = total(a) & print,systime(1)-t
0.25451803
IDL> t = systime(1) & b = total(a,/nan) & print,systime(1)-t
0.35278893

I've thought at times that arrays should carry a hidden bit saying
whether or not they include NaN values, but this introduces other
overhead problems.

--Wayne
[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
Read Message
Read Message
Previous Topic: Re: dependency tree / call graph in idl (cscope for idl)?
Next Topic: bake a cake

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

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

Total time taken to generate the page: 0.40068 seconds