From owner-freebsd-questions Mon Aug 17 15:02:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA01880 for freebsd-questions-outgoing; Mon, 17 Aug 1998 15:02:35 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from marvin.ece.utexas.edu (marvin.ece.utexas.edu [128.83.52.151]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA01875 for ; Mon, 17 Aug 1998 15:02:34 -0700 (PDT) (envelope-from bgrayson@marvin.ece.utexas.edu) Received: (from bgrayson@localhost) by marvin.ece.utexas.edu (8.8.8/8.8.8) id RAA04386 for freebsd-questions@freebsd.org; Mon, 17 Aug 1998 17:00:29 -0500 (CDT) Message-ID: <19980817170029.A4330@marvin.ece.utexas.edu> Date: Mon, 17 Aug 1998 17:00:29 -0500 From: "Brian C. Grayson" To: freebsd-questions@FreeBSD.ORG Subject: Avoiding SIGFPE Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Under NetBSD, 1.0/0.0 returns NaN. Under FreeBSD, it causes an exception. I could have sworn there was some way to specify which behavior one wanted, but I can't find it anywhere. Is there any way in FreeBSD to say ``just return NaN'', or will it always SIGFPE me? Or, is there any way to write a signal handler that will catch the SIGFPE, and tell it to just use a value of NaN, and resume execution? I'm already trapping signals and installing signal handlers in this app, so installing another one would be No Big Deal. TIA. Brian -- "...and the particle undergoes a BOINNNNG..." - Dr. Dunning, PHYS 202 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message