*BSD News Article 62864


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.uoknor.edu!news.nodak.edu!netnews1.nwnet.net!news.u.washington.edu!root
From: kargl@troutmask.apl.washington.edu
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Update for FreeBSD math libraries?
Date: 7 Mar 1996 17:05:08 GMT
Organization: Applied Phyics Lab
Lines: 28
Message-ID: <4hn504$47l@nntp5.u.washington.edu>
References: <4hlpi0$n3p@cronkite.seas.gwu.edu>
NNTP-Posting-Host: troutmask.apl.washington.edu

     Brad Stubbs wrote in article <4hlpi0$n3p@cronkite.seas.gwu.edu> :
>
>Is an update to the FreeBSD math libraries planned anytime soon.  I've
>got a number of programs originally written for SunOS 4.1.3 that generate
>floating point errors and core dump.  I can compile and run them on a
>Linux box by using -lieee (which doesn't really do anything except set
>the math co-processor control word to 0x137f).  I've looked at fpsetmask()
>and friends but these don't seem to deal with the high 4 bits (I think I
>need to set bit #12).  Can anyone help me out?
>
>

FreeBSD supplies the Sun math library and I believe it is the default
library.  That is, FreeBSD also supplies the CSRG 4.4 Lite math library
code, but it is not the default.  The Sun library is built with the following
defines: -D_MULTI_LIBM -D_POSIX_MODE -D_IEEE_LIBM, so you should expect
IEEE behavior.  You may also need to include floatingpoint.h at the top
of your code.

Check to see which library you have installed.


Steven G. Kargl     | Phone: 206-685-4677 |
Applied Physics Lab | Fax:   206-543-6785 |
Univ. of Washington |---------------------|
1013 NE 40th St     | FreeBSD 2.x-STABLE  |
Seattle, WA 98105   |---------------------|