From owner-freebsd-hackers Wed Jun 30 8:39:16 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 60DBB153A9 for ; Wed, 30 Jun 1999 08:39:13 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id KAA51909; Wed, 30 Jun 1999 10:39:11 -0500 (CDT) (envelope-from dan) Date: Wed, 30 Jun 1999 10:39:10 -0500 From: Dan Nelson To: Jos Backus Cc: freebsd-hackers@FreeBSD.ORG, Tobi Oetiker Subject: Re: [tobi@caida.org: Re: [MRTG-DEV] CDEF's with LT and IF in .42] Message-ID: <19990630103910.B50144@dan.emsphone.com> References: <19990630151551.C51182@hal.mpn.cp.philips.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: <19990630151551.C51182@hal.mpn.cp.philips.com>; from "Jos Backus" on Wed Jun 30 15:15:51 GMT 1999 X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jun 30), Jos Backus said: > ----- Forwarded message from Tobi Oetiker ----- > > OK found your problem .... it is that old FreeBSD does no proper > > IEEE math ... > > > > for some comparison operations it raises an sigfpe if an NaN is > > involved ... > > > > the next release of rrdtool will come with a proper test to find > > the problem and a proper fix in the software to ignore sigfpe > > Saw this on the MRTG-DEV list. > NaN handling is perceived to be problematic, it seems. The last time this came up (and it comes up every 6 months or so), the consensus was that we would rather trap FP errors than blindly pass them on to the user application. If a program wants to ignore NaN, divide-by-zero, underflow, and overflow conditions, let it wrap the offending line of code with two fpsetmask() calls; one to mask the condition, and one to restore the previous mask. If you want to completely ignore floating point errors, call fpsetmask(0) at the top of main(). I scanned the mailinglists and the thread that covers this issue most completely is http://www.freebsd.org/cgi/mid.cgi?id=199710101907.OAA09470@millenia.srrc.usda.gov -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message