From owner-freebsd-current Tue Mar 21 0:47:11 2000 Delivered-To: freebsd-current@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 08C4237B79F for ; Tue, 21 Mar 2000 00:47:02 -0800 (PST) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 21 Mar 2000 08:47:00 +0000 (GMT) To: current@freebsd.org Subject: Floating point exceptions. X-Request-Do: Date: Tue, 21 Mar 2000 08:47:00 +0000 From: David Malone Message-ID: <200003210847.aa00165@salmon.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Floating point exceptions seem to have been turned off by default: gonzo 13% uname -r 5.0-CURRENT gonzo 14% cat a.c double div(double x,double y) { return x/y; } int main() { double x; x = div(1.0,0.0); printf("%f\n",x); } gonzo 15% gcc -o a a.c gonzo 16% ./a Inf This seems to produce an SIGFPE on 3.0, which I would have thought was the correct thing to do: walton 12% uname -r 3.4-STABLE walton 13% cat a.c double div(double x,double y) { return x/y; } int main() { double x; x = div(1.0,0.0); printf("%f\n",x); } walton 14% gcc -o a a.c walton 15% ./a Floating exception (core dumped) There was a discussion on one of the list about what to do for floating point excpetions recently, and I thought people decided that causing a signal by default was a right thing? I presume this was caused by the commit below? David. cracauer 2000/03/10 09:56:33 PST Modified files: sys/i386/include npx.h Log: Change the default FPU control word so that exceptions for new processes are now masked until set by fpsetmask(3). Submitted by: bde Approved by: jkh, bde Revision Changes Path 1.18 +5 -35 src/sys/i386/include/npx.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message