*BSD News Article 43262


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!uwm.edu!cs.utexas.edu!swrinde!gatech!newsxfer.itd.umich.edu!jobone!lynx.unm.edu!chaco.cs.unm.edu!mcclure
From: mcclure@chaco.cs.unm.edu (Brent McClure)
Newsgroups: comp.os.386bsd.bugs
Subject: FreeBSD 2.0 Math library broken?
Date: 8 Mar 1995 05:12:18 GMT
Organization: The University of New Mexico, Department of Computer Science
Lines: 32
Sender: news@chaco.cs.unm.edu
Message-ID: <D53vsI.2w3@chaco.cs.unm.edu>
NNTP-Posting-Host: chaco.cs.unm.edu

I'm getting numerous floating exceptions while running some pretty 
routine calls to the math library which should generate an error,
but not core dump.  Both of the following two programs generate a 
FPE and core on my system:

main()
{
  double d;
  d = pow(3.0,1000001.0);
  d = pow(4.0,1000001.0);
}

main()
{
  acos(-2.0);
}

My system is :

2.0-RELEASE FreeBSD 2.0-RELEASE #0

ldd output from one of these programs gives the following output:
% ldd a.out
a.out:
        -lm.2 => /usr/lib/libm.so.2.0 (0x801a000)
        -lgcc.261 => /usr/lib/libgcc.so.261.0 (0x8032000)
        -lc.2 => /usr/lib/libc.so.2.0 (0x8036000)

What do I need to upgrade to fix this?

thanks, Brent