In the last episode (Jun 30), Jos Backus said: > ----- Forwarded message from Tobi Oetiker <[email protected]> ----- > > 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/[email protected] -Dan Nelson [email protected] To Unsubscribe: send mail to [email protected] with "unsubscribe freebsd-hackers" in the body of the message

