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

Home » Public Forums » archive » Ug...Floating Illegal Operand...leave me alone!
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
Ug...Floating Illegal Operand...leave me alone! [message #25786] Tue, 17 July 2001 13:05 Go to next message
randomguy79 is currently offline  randomguy79
Messages: 1
Registered: July 2001
Junior Member
Hey everyone,

I'm rather new to the world of IDL...so bear with me. I've been
attempting to debug a program all afternoon...but the damn "Program
caused an arithmetic error: Floating illegal operand" message won't go
away no matter what I do. I've narrowed the problem down to an
expression in the following form:
a=a+((b*c)/d) where all the variables are of DOUBLE precision. They
were originally FLOAT but I changed them all and thought it may have
been the problem, but apparently it wasn't.

A little more detail on the program: I'm working through about 73
datasets using a for loop. The expression above is embedded in an
additional for loop so as to perform some manipulations ((b*c)/d) on
arrays and sum all these manipulations into 'a.' The interesting
thing is, I can run 1, 10, or even 72 datasets and not get the
"floating illegal operand" error. Only when I run all 73 datasets at
once do I recieve the message when the program is complete. I'm
getting results as well...I just question whether or not they're right
because of the arithmetic error.

I'm not sure if the Check_math function would help out here or not. I
tried using it earlier but I couldn't actually figure out how to use
it properly. Can anyone help me out here at all? Either helping me
diagnose this or helping me figure out how to use the check_math
function? I'm really stumped and extremely frustrated. Thanks.

Matt
randomguy79@yahoo.com
Re: Ug...Floating Illegal Operand...leave me alone! [message #25866 is a reply to message #25786] Wed, 18 July 2001 08:55 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Timm Weitkamp wrote:
>
> Hi,
>
> Concerning Jeff's statement:
>
>> zeros. (I don't think there's a way to make IDL halt at the time the
>> error occurs, as it does with other errors.)
>
> I think that's true, but you can at least make IDL print out the error
> message at the moment where it occurs (instead of the default behavior
> of message output after program termination) by setting the system
> variable !EXCEPT to 2.

Excellent advice for finding those pesky "Floating Illegal Operand" errors. It allowed me
to find where floating underflows in the denominator of an expression were causing rather
largish errors... :o)

Be prepared for a lot of screen output though.

paulv

--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
Alexander Pope.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: emacs idlwave shell key bindings
Next Topic: Huge datasets under Win2000

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

Current Time: Wed Oct 08 19:22:08 PDT 2025

Total time taken to generate the page: 0.00494 seconds