Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Dec 94 09:28:58 EST
From:      L Jonas Olsson <ljo@pris.EEAP.CWRU.Edu>
To:        dgy@seagull.rtd.com
Cc:        freebsd-hackers@freefall.cdrom.com
Subject:   Re: 1.1.5.1R libm
Message-ID:  <9412271428.AA20820@pris.EEAP.CWRU.Edu>
In-Reply-To: <199412271343.GAA03413@seagull.rtd.com> (message from Don Yuniskis on Tue, 27 Dec 1994 06:43:54 -0700 (MST))

next in thread | previous in thread | raw e-mail | index | archive | help
/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 <stdlib.h> 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 <floatingpoint.h>

and in main()
 fpsetmask(0); /* Checl floatingpoint.h for other masks */

Jonas




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9412271428.AA20820>