embedding octave - floating point exception
Marco Driusso
marcodriusso at gmail.com
Thu Mar 12 05:03:13 CDT 2009
On 2009/3/11 Jason Riedy wrote:
> Oy. The tcl init code in ns-2 explicitly turns on trapping /
> interrupts for division by zero. There's a bizarre comment
> before that code, but it looks like a conscious decision on their
> part.
Are you talking about this one?
static inline void
setup_floating_point_environment()
{
[....]
/*
* In general we'd like to catch some serious exceptions (div by zero)
* and ignore the boring ones (overflow/underflow).
* We set up that up here.
* This depends on feenableexcept which is (currently) GNU
* specific.
*/
int trap_exceptions = 0;
[....]
trap_exceptions |= FE_DIVBYZERO;
[....]
trap_exceptions |= FE_INVALID;
[....]
trap_exceptions |= FE_OVERFLOW;
[....]
// trap_exceptions |= FE_UNDERFLOW;
[....]
feenableexcept(trap_exceptions);
[....]
}
in the .../ns-2.33/common/tkAppInit.cc ? If so, I've tried to change these
exceptions and remove the wrapping around the calls to octave, but I got the
older floating point exception. Debugging I realized that running my
simulation in ns-2 I don't call this function. And so, could you please tell
me the file are you talking about, if is not this one?
Thank you so much for the collaboration, you're giving me a big help.
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090312/2a3edd98/attachment.html
More information about the Help-octave
mailing list