|
Re: idl system variable for overflow/underflow errors [message #77466 is a reply to message #77465] |
Wed, 07 September 2011 08:21  |
simona bellavista
Messages: 56 Registered: December 2009
|
Member |
|
|
I looked a little bit into it and I found out I can use the function
check_math() for this task.
I write it here in case this can help somebodyelse in future
On Sep 7, 5:06 pm, simona bellavista <afy...@gmail.com> wrote:
> Hi all,
>
> I am trying to debug a program that give overflow errors and I get a
> printout that says "Program caused arithmetic error: Floating
> overflow". I would like to know if there is a system variable that
> registers that an overflow has happened, something like !overflow = 1
> if an overflow has occurred, otherwise zero.
>
> Thanks a lot
|
|
|
|
Re: idl system variable for overflow/underflow errors [message #77468 is a reply to message #77467] |
Wed, 07 September 2011 08:20  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 9/7/11 9:06 AM, simona bellavista wrote:
> Hi all,
>
> I am trying to debug a program that give overflow errors and I get a
> printout that says "Program caused arithmetic error: Floating
> overflow". I would like to know if there is a system variable that
> registers that an overflow has happened, something like !overflow = 1
> if an overflow has occurred, otherwise zero.
>
> Thanks a lot
Look at the CHECK_MATH routine. You can call it to find what types of
math errors have happened since the last time you called it.
Also, there is a system variable, !EXCEPT, that lets you specify the
level of detail in your overflow error message. Robin Wilson recently
had a blog post about it:
http://blog.rtwilson.com/get-more-detailed-messages-for-math s-errors-in-idl/
Note that CHECK_MATH and !EXCEPT interact with each other as described
in the CHECK_MATH documentation.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
|
|
|