Date: Mon, 22 Jul 1996 18:07:41 +0200 (IST) From: Eli Zaretskii To: Raja Vallee-Rai Cc: djgpp AT delorie DOT com Subject: Re: Floating point exception trapping. In-Reply-To: <31F3883C.4EE146DC@cs.mcgill.ca> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 22 Jul 1996, Raja Vallee-Rai wrote: > Is there a nice way of trapping floating point exceptions > in DJGPP, as in Watcom C? (via a matherr() function) I think that libm.a has `matherr' (you need to link with -lm). I don't know if it will be called for every fp exception, though, and you might need to set the x87 to a certain state for this to work (check out the `_control87' library function). For more details, download the library sources (djlsr200.zip) and look into the src/libm directory.