From owner-freebsd-hackers Tue Dec 27 06:29:36 1994 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id GAA15338 for hackers-outgoing; Tue, 27 Dec 1994 06:29:36 -0800 Received: from pris.EEAP.CWRU.Edu (pris.EEAP.CWRU.Edu [129.22.56.99]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id OAA15332 for ; Tue, 27 Dec 1994 14:29:28 GMT Received: from marvin.EEAP.CWRU.Edu by pris.EEAP.CWRU.Edu (4.1/CWRU-1.4-snrub client) id AA20820; Tue, 27 Dec 94 09:28:58 EST (from ljo for freebsd-hackers@freefall.cdrom.com) Message-Id: <9412271428.AA20820@pris.EEAP.CWRU.Edu> Date: Tue, 27 Dec 94 09:28:58 EST From: L Jonas Olsson Received: by marvin.EEAP.CWRU.Edu (4.1/CWRU-1.4-snrub client) id AA07338; Tue, 27 Dec 94 09:28:52 EST (from ljo ) To: dgy@seagull.rtd.com Cc: freebsd-hackers@freefall.cdrom.com In-Reply-To: <199412271343.GAA03413@seagull.rtd.com> (message from Don Yuniskis on Tue, 27 Dec 1994 06:43:54 -0700 (MST)) Subject: Re: 1.1.5.1R libm Reply-To: ljo@po.CWRU.Edu.Note.that.there.are.two.alternative.math.libraries.the Sender: hackers-owner@freebsd.org Precedence: bulk /usr/src/lib/libm is the BSD library and /usr/src/lib/msun is the Sun math library. Which one are you using? If you only have binary lib test with: nm /usr/lib/libm.so.1.1 |grep ___kernel if you find anything you have Sun library. These are compatible (The Sun library contains all functions from the BSD library, but not the other way), except for the gamma function. In the BSD library the gamma() returns the gamma function. In the Sun library it returns the logarithm of the gamma function. You have to be very careful with functions returning double, a classic one is that many programs that use atof() without including die from messed up stack. Use gcc -Wall to check for implicit declarations of any functions returing doubles. If you want to avoid FPE's even for things generating Inf/-Inf you can use #include and in main() fpsetmask(0); /* Checl floatingpoint.h for other masks */ Jonas