Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Aug 1997 09:50:01 -0700 (PDT)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs
Subject:   Re: i386/4226: Floating point exception for double precision divion by zero
Message-ID:  <199708041650.JAA10015@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/4226; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: FreeBSD-gnats-submit@FreeBSD.ORG, geoffb@demon.net
Cc:  Subject: Re: i386/4226: Floating point exception for double precision divion by zero
Date: Tue, 5 Aug 1997 02:45:15 +1000

 >Double precision division by zero produces a floating point exception.
 >(Yes I know things shouldn't do this, but some do as other OSs return Max
 >Int if you do this.) I assume this occurs because division is done as a 
 >a floating point operation?
 
 It occurs because some people prefer getting SIGFPE to getting possibly
 wrong results by default.  In FreeBSD, exceptions for floating point
 division by zero can be masked using fpsetmask().  There is no portable
 way to do this.
 
 Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708041650.JAA10015>