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

Home » Public Forums » archive » Re: idl system variable for overflow/underflow errors
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: idl system variable for overflow/underflow errors [message #77465] Wed, 07 September 2011 08:26
simona bellavista is currently offline  simona bellavista
Messages: 56
Registered: December 2009
Member
Yeah, thanks you a lot
I didn't see your replies and answered to myself :D

On Sep 7, 5:20 pm, Brian Wolven <brian.wol...@gmail.com> wrote:
> You might look at the help for the check_math function; that probably has the info you need.
Re: idl system variable for overflow/underflow errors [message #77466 is a reply to message #77465] Wed, 07 September 2011 08:21 Go to previous message
simona bellavista is currently offline  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 #77467 is a reply to message #77466] Wed, 07 September 2011 08:20 Go to previous message
Brian Wolven is currently offline  Brian Wolven
Messages: 94
Registered: May 2011
Member
You might look at the help for the check_math function; that probably has the info you need.
Re: idl system variable for overflow/underflow errors [message #77468 is a reply to message #77467] Wed, 07 September 2011 08:20 Go to previous message
Michael Galloy is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: idl system variable for overflow/underflow errors
Next Topic: Cool animated map. Not IDL per se. But cool!

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

Current Time: Fri Oct 10 08:13:39 PDT 2025

Total time taken to generate the page: 0.00795 seconds