From owner-freebsd-questions Mon Feb 2 17:58:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA29545 for questions-outgoing; Mon, 2 Feb 1998 17:58:01 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from helmholtz.salk.edu (helmholtz.salk.edu [198.202.70.34]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA29384 for ; Mon, 2 Feb 1998 17:56:05 -0800 (PST) (envelope-from bartol@salk.edu) Received: from dale.salk.edu (dale [198.202.70.112]) by helmholtz.salk.edu (8.7.5/8.7.3) with SMTP id QAA16948; Mon, 2 Feb 1998 16:33:33 -0800 (PST) Date: Mon, 2 Feb 1998 16:33:30 -0800 (PST) From: Tom Bartol To: freebsd-questions@FreeBSD.ORG cc: mika@sdna2.ucsd.edu Subject: IEEE Floating Point question: Inf and NaN Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe questions" Hi, I am asking this question on behalf of a friend who is helping to develop a very nice mathematics tool. I finally convinced him to try FreeBSD (after much coaxing -- yeah!!), however in porting his code from Linux to FreeBSD he has discovered that the math libraries in FreeBSD (2.2.5 and -current) do not return "Inf" on 1.0/0.0 or "NaN" on 0.0/0.0 but rather result in a rather unpleasant "Floating exception (core dumped)" !!! Is there some way to change this behavior so that it returns Inf or NaN as appropriate. I've compiled a little test program under native FreeBSD and under /compat/linux and have found that the /compat/linux version returns the appropriate Inf or NaN. If the solution requires writing new code in the core math routines of FreeBSD, how difficult would it be to tackle this job? What documentation would aid this quest? It would be a shame to loose a good software product from a commercial vendor due to something as silly as this. Thanks for your help, Tom