*BSD News Article 43237


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!uwm.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!swrinde!gatech!ncar!newshost.lanl.gov!ferrari.mst6.lanl.gov!tesuque.cs.sandia.gov!lynx.unm.edu!chaco.cs.unm.edu!mcclure
From: mcclure@chaco.cs.unm.edu (Brent McClure)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: freebsd 2.0 math library broken?
Date: 7 Mar 1995 04:22:16 GMT
Organization: The University of New Mexico, Department of Computer Science
Lines: 36
Sender: news@chaco.cs.unm.edu
Message-ID: <D51yt4.Dxp@chaco.cs.unm.edu>
NNTP-Posting-Host: chaco.cs.unm.edu

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

#include<stdio.h>
#include<math.h>
main()
{
  double d;
  d = pow(3.0,1000001.0);
  d = pow(4.0,1000001.0);
}

or

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