[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Locate an underflow



From: "Francesco" <francesco.spada@jrc.it>
> I've got this error
> 
> % Program caused arithmetic error: Floating underflow
> 
> Is it possible to know where it appens without putting a million of
> stop or breakpoint in my program?

Set the !EXCEPT system variable to 2.

From IDL 5.4 documentation:

    !EXCEPT

    An integer variable that controls when IDL checks for invalid
    mathematical computations (exceptions), such as division by zero.
    The three allowed values are:

    Value Description

    0 Never report exceptions.

    1 Report exceptions when the interpreter is returning to an
    interactive prompt (the default).

    2 Report exceptions at the end of each IDL statement. Note that
    this slows IDL by roughly 5% compared to setting !EXCEPT=1.

    For more information on invalid mathematical computations and
    error reporting, see Math Errors. The value of !EXCEPT is used by
    the CHECK_MATH function to determine when to return errors. See
    CHECK_MATH for details.

---
Mark Hadfield
m.hadfield@niwa.cri.nz  http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research




-- 
Posted from clam.niwa.cri.nz [202.36.29.1] 
via Mailgate.ORG Server - http://www.Mailgate.ORG