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

Home » Public Forums » archive » Re: Problem with plot: "Program caused arithmetic error: Floating underflow"
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
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41219] Mon, 18 October 2004 06:17
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ale writes:

> PS. Are you still in Germany? Italy is close...*

Well, I am in Germany for another month, but my schedule
is getting fuller even as we speak. Still, Italy.... I could
probably free up some time. :-)

Cheers,

David

P.S. Let's just say my experiences in Germany vis-a-vis the
Italians has left a little to be desired. I would *love* to
be convinced it was the beautiful country, full of amore,
I've always imagined it was. No beer there, I take it. Wine?

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41221 is a reply to message #41219] Mon, 18 October 2004 04:51 Go to previous message
sandrokan is currently offline  sandrokan
Messages: 20
Registered: September 2004
Junior Member
"David Fanning" <david@dfanning.com> ha scritto nel messaggio
news:MPG.1bdd346a76670cae98969f@news.frii.com...
> sandrokan writes:
>
> No reason at all. But you can't be comfortable and complain
> about things, too. Das ist verboten. :-)

Yes, even if I was only looking for some help, it sounded a little bit like
a complaint, excusez-moi :-)

> P.S. Well, unless you have written software without bugs
> in it. None of the rest of us qualify, that's for sure. :-(
>

Well...no, I have no code of mine w/out bugs, that's for sure, but people
frequently ask me to patch them (regardless to the fact that they are for
free) and I do.

PS. Are you still in Germany? Italy is close...*

Regards

Ale

Alessandro Mura, PhD.
CNR
Istituto di Fisica dello Spazio Interplanetario
Via del Fosso del Cavaliere 100
Roma
06 49934386


*sponsored by the Italian Minister of Tourism
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41222 is a reply to message #41221] Mon, 18 October 2004 02:01 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
sandrokan writes:

> BTW, about IDL5.2 upgrading: Of course, I think it is a good idea to upgrade
> a program when new
> releases are available, but: (1) these are not free; (2) I feel confortable
> with my 5.2, why changing?

No reason at all. But you can't be comfortable and complain
about things, too. Das ist verboten. :-)

Cheers,

David

P.S. Well, unless you have written software without bugs
in it. None of the rest of us qualify, that's for sure. :-(

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41223 is a reply to message #41222] Mon, 18 October 2004 00:43 Go to previous message
sandrokan is currently offline  sandrokan
Messages: 20
Registered: September 2004
Junior Member
> OK, but surely you can work around it. How about converting your UINT
> data to FLOAT before plotting it?
>
I doesn't work. I think the problem is the big amount of points with tha
same abscissa.
IDL Version 5.2 (Win32 x86). Research Systems, Inc.

For basic information, enter "IDLInfo" at the IDL> prompt.

IDL> z=[uintarr(1789),115+uintarr(46762-1789),uintarr(300)]

IDL> plot, z, z

% Program caused arithmetic error: Floating underflow

IDL> plot, float(z), float(z)

% Program caused arithmetic error: Floating underflow

The IDL helpdesk has sent me an hint. In practice, you can disable warnings
and
re-enable them just after that call.


< slightly OT>

BTW, about IDL5.2 upgrading: Of course, I think it is a good idea to upgrade
a program when new
releases are available, but: (1) these are not free; (2) I feel confortable
with my 5.2, why changing?
Is progress funcion of my needs, or the inverse? I have everything I need
with 5.2;
if,working on a subsequent version, I release my codes to other scientists
, there's the risk thet all my colleagues
are forced to upgrade their version too...

<more OT>

Why s/w should be changed so oftenly, if there's nothing that wears down? My
Lancia Fulvia Coupe is 35 years old, still works...well, sometimes I push
her in her back, it is a
"patch"..:-)

</OT>

Alessandro
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41227 is a reply to message #41223] Fri, 15 October 2004 07:06 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> Paul Van Delst writes:
>
>
>> In the interests of pedantry, 5.2 was released near the end of 1998. Not quite 10 years,
>> but a goodly time ago. I started using IDL around 10 or so years ago and I think v3.6 was
>> the version of choice back then.
>
>
> But isn't one year of human time seven years of software time?

I was going to brig that up, but I figured that would be pushing it too far...

> Or, have I got that wrong. :-)

No - I think that is pretty accurate. The software I wrote a year ago is a real dog. Looks
_and_ runs like one. :o(

<groan attribute="eyeroll">

paulv
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41231 is a reply to message #41227] Fri, 15 October 2004 09:35 Go to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
Mark Hadfield wrote:

> sandrokan wrote:
>>
>> IDL> z=[uintarr(1789),115+uintarr(46762-1789),uintarr(300)]
>> IDL> plot, z
>> IDL> plot, z, z
>> % Program caused arithmetic error: Floating underflow
>
> Nope, I don't see it (IDL 6.0 & 6.1 on Windows 2000). Do you get
> anything like this when you represent the same numeric values with other
> data types?
>
> Perhaps its a bug in IDL's handling of UINT values. I note that you are
> using 5.2. Unsigned integers were introduced in that version; perhaps
> they hadn't ironed out all the wrinkles.
>
> Does this error actually matter to you? Ie. does your program misbehave
> in any other way? Floating underflows are often benign.
>

I've just performed a history check.

IDL | underflow "feature"
----------------------
5.1.1 | yes (no UINT, but does appear for FLTARR)
5.2 | yes
5.3 | yes
5.4 | dunno, don't have 5.4
5.5 | no
5.6 | no

So, the "feature" seems to have been removed sometime after 5.3

It's the same with FLTARR and DBLARR, which sort of indicates it's not UINT
at fault, and the fact that it appears in 5.1.1 (the earliest version I
have) when there was no UINT makes it pretty certain.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41236 is a reply to message #41227] Thu, 14 October 2004 14:52 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
sandrokan wrote:
> "Mark Hadfield" <m.hadfield@niwa.co.nz> ha scritto nel messaggio
> news:ckk4el$mte$1@newsreader.mailgate.org...
>
>
>> Does this error actually matter to you? Ie. does your program misbehave
>> in any other way? Floating underflows are often benign.
>
>
> I need to release my code to some users, I think that they could worry if
> they see
> such a message. Also, IDL refuses to plot them (sometimes, not always) if
> I use psym=8 with _some_ usersym definition.....
>
> In the end, I think it is another bug of IDL.

OK, but surely you can work around it. How about converting your UINT
data to FLOAT before plotting it?


--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41299 is a reply to message #41236] Thu, 14 October 2004 14:49 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Paul Van Delst wrote:
> In the interests of pedantry, 5.2 was released near the end of 1998. Not
> quite 10 years, but a goodly time ago. I started using IDL around 10 or
> so years ago and I think v3.6 was the version of choice back then.

Uh oh, it looks like another "I started using IDL 3 centures ago at
version -10 on an abacus" thread is in danger of breaking out. Oh well,
might as well accept the inevitable...

I started in late 1992/early 1993 and I *think* it was version 3.1 or
maybe 3.5. (I don't think the intervening version numbers existed). For
16-bit Windows, outlandish though that may seem. It was compiled with
the Watcom compiler, which supported 32-bit flat memory via a DOS
exetender, or some such nonsense. I recall that my PC had 256 MiB of RAM
... no, that can't be right, 256 MiB of *disk space* and 16 MiB of RAM.

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41300 is a reply to message #41299] Thu, 14 October 2004 13:30 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul Van Delst writes:

> In the interests of pedantry, 5.2 was released near the end of 1998. Not quite 10 years,
> but a goodly time ago. I started using IDL around 10 or so years ago and I think v3.6 was
> the version of choice back then.

But isn't one year of human time seven years of software time?
Or, have I got that wrong. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41307 is a reply to message #41300] Wed, 13 October 2004 01:49 Go to previous message
sandrokan is currently offline  sandrokan
Messages: 20
Registered: September 2004
Junior Member
BTW, it's IDL5.2.

Ale
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41308 is a reply to message #41307] Wed, 13 October 2004 01:04 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
sandrokan writes:

> Yes: I've downloaded from ftp://ftp.artov.rm.cnr.it/incoming/IFSI/ and then
> IDL> restore, 'test.idl'
>
> IDL> plot, x, x
>
> % Program caused arithmetic error: Floating underflow
>
>
>
> There are non NaNs or Infs, it seems...
>
>
>
> I'm working on a P4 (XP)

Byte order problem? Have a look at BYTEORDER or the SWAP...
keywords on the OPEN commands.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41309 is a reply to message #41308] Wed, 13 October 2004 00:26 Go to previous message
sandrokan is currently offline  sandrokan
Messages: 20
Registered: September 2004
Junior Member
> I don't get this error and don't see why you would get it. The contents
> of X look pretty unremarkable to me.
>
> Perhaps you have some sort of scaling in effect on the X axis. Have you
> tried again in a new IDL session?
>

Yes: I've downloaded from ftp://ftp.artov.rm.cnr.it/incoming/IFSI/ and then
IDL> restore, 'test.idl'

IDL> plot, x, x

% Program caused arithmetic error: Floating underflow



There are non NaNs or Infs, it seems...



I'm working on a P4 (XP)

Ale
Re: Problem with plot: "Program caused arithmetic error: Floating underflow" [message #41310 is a reply to message #41309] Tue, 12 October 2004 13:41 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
sandrokan wrote:
> Hello:
> I've got this problem with this array x, saved in
> ftp://ftp.artov.rm.cnr.it/incoming/IFSI/
> help, x
>
> X UINT = Array[421412]
>
> IDL> plot, x
>
> IDL> plot, x, x
>
> % Program caused arithmetic error: Floating underflow

I don't get this error and don't see why you would get it. The contents
of X look pretty unremarkable to me.

Perhaps you have some sort of scaling in effect on the X axis. Have you
tried again in a new IDL session?

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL procedure to test/cerify IDL routines
Next Topic: initial keyboard focus, tabbing and keyboard accelerators

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

Current Time: Wed Oct 08 20:02:09 PDT 2025

Total time taken to generate the page: 0.79895 seconds