[1086] in Coldmud discussion meeting

root meeting help first previous next last

[COLD] Floating-point exception bug

daemon@ATHENA.MIT.EDU (Sun Sep 8 19:18:07 1996 )

Date: Sun, 8 Sep 1996 15:56:46 -0700
From: Brian Buchanan <brian@wasteland.calbbs.com>
To: coldstuff@cold.org


Recently, I encountered a problem where certain floating point operations would throw ~fpe for no good reason (if they were called again immediately, they worked).  I think I've traced this to caught_fpe being set true from a previous SIGFPE unrelated to the current FP operation.  In the macros MATH_HOOK_FPE_2 and MATH_HOOK_FPE, I added "caught_fpe = 0; \" right before "r = _math_  (( ..." and this seems to have cleared it up.  There may be other places where this should be done, though.

---
   Brian Buchanan    sysop@calbbs.com    brian@wasteland.calbbs.com