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

Home » Public Forums » archive » Re: how to debug floating error
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: how to debug floating error [message #31380] Wed, 10 July 2002 05:16
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <agggkc$f13$1@dipsy.missouri.edu>,
"Julia" <julia65201@yahoo.com> wrote:

> % Program caused arithmetic error: Floating underflow
> % Program caused arithmetic error: Floating overflow
> % Program caused arithmetic error: Floating illegal operand
> "
>
> The program can run till the end of it. And only these error informations
> are displayed. How can I know where these errors occure? How can I debug
> them out?

The first thing to do is to set

!EXCEPT = 2

See the chapter on controlling errors in the "Building IDL Applications"
manual.

Regards, Ken
Re: how to debug floating error [message #31381 is a reply to message #31380] Wed, 10 July 2002 03:36 Go to previous message
user is currently offline  user
Messages: 8
Registered: August 1999
Junior Member
well i don't know if this is going to help at all, but i had a
quite similar problem when
i started using idl few weeks ago. i operated alog() to a matrix
which contained negative
values. error message was:

% Program caused arithmetic error: Floating divide by 0
% Program caused arithmetic error: Floating illegal operand

but the operation still ran to the end. values that couldn't be
calculated were replaced
with string '-NaN' in the result matrix. now you can at least
start tracing the problem :)
just convert the image matrix to string and execute the command

print,where(string_matrix eq ' -NaN')

notice the white spaces :)

check your calculations
and think what values are considered as 'bad data'. i hope this helps.

oh, the other possible string can be '-Inf'

-sauli

Julia wrote:
> Hi, there,
>
> I made a program to do the FFT analysis of an image. After the program
> terminated, there are some error information printed in the log window:
> "
> % Program caused arithmetic error: Floating underflow
> % Program caused arithmetic error: Floating overflow
> % Program caused arithmetic error: Floating illegal operand
> "
>
> The program can run till the end of it. And only these error informations
> are displayed. How can I know where these errors occure? How can I debug
> them out?
>
> Any suggestion will be appreciated,
>
> Julia
>
>
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Updating existing IDL table widget
Next Topic: frequency distribution and bytscl

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

Current Time: Wed Oct 08 13:52:08 PDT 2025

Total time taken to generate the page: 0.00603 seconds