help-octave
[Top][All Lists]
Advanced

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

Re: embedding octave - floating point exception


From: Jason Riedy
Subject: Re: embedding octave - floating point exception
Date: Wed, 11 Mar 2009 09:44:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

And Marco Driusso writes:
> Debugging with gdb, I've founded that octave_main ends correctly (in the
> previous case it stops when calling octave_ieee_init), but the program stops
> when feupdateev is called; debugging I get:
[...]
> Some suggestions? I'm calling feupdateenv or feholdexcept in the wrong way?

And Marco Driusso writes:
> With:
[...]
> feclearexcept(FE_ALL_EXCEPT);
> feupdateenv(&curr_env);
>
> runs! Thanks for the help.

Ok, the larger program *is* set to interrupt on floating-point
exceptions.  As you discovered, feupdateenv() merges the floating-point
state.  The interrupt state is set, then the exceptional flags are
raised[1], so an interrupt occurs.

Is the larger code free software and available somewhere for inspection?
I'm interested because this also is an issue for LAPACK and ScaLAPACK.
By default LAPACK assumes a non-stop environment.  Some of the
eigenvalue codes rely on IEEE-754 default exceptional behavior, and we
detect if we can use them at LAPACK *build* time.

Jason

Footnotes: 
[1]  I'm sure C99 leaves the exact ordering and semantics to the
implementation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]