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

Home » Public Forums » archive » Should IDL throw a warning in this case?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Should IDL throw a warning in this case? [message #76843] Wed, 06 July 2011 08:00
Fabzou is currently offline  Fabzou
Messages: 76
Registered: November 2010
Member
Hi IDLers,

Just a thought about the last 10 minutes I lost understanding why the
MEAN() function was computing wrong values:

IDL> print, !VERSION
{ x86_64 linux unix linux 7.1.1 Aug 21 2009 64 64}
IDL> tk = FLTARR(150,150,27,13, /NOZERO)
IDL> tc = tk - 273.15
IDL> print, min(tk-tc), max(tk-tc)
273.150 273.150

everything OK, until:

IDL> print, mean(tk-tc)
267.597

Oh my god, how is this even possible???? Am I getting crazy?

And then, after 5 minutes and a coffee break:

IDL> print, mean(tk-tc, /DOUBLE)
273.14999

Uf, thank god I'm not crazy.

My feeling would say: IDL should throw a warning when you are
manipulating too big numbers (in my case: too big arrays) with IDL
built-in functions.

However, you IDL experts may not think so. What would be the reasons for
not throwing a warning? Thanks!

Fabien
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: step function
Next Topic: postscript output

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

Current Time: Wed Oct 08 15:56:49 PDT 2025

Total time taken to generate the page: 0.00561 seconds