www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/22/11:12:21

Date: Mon, 22 Jul 1996 18:07:41 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Raja Vallee-Rai <kor AT cs DOT mcgill DOT ca>
Cc: djgpp AT delorie DOT com
Subject: Re: Floating point exception trapping.
In-Reply-To: <31F3883C.4EE146DC@cs.mcgill.ca>
Message-Id: <Pine.SUN.3.91.960722180445.8643G-100000@is>
Mime-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019