*BSD News Article 32949


Return to BSD News archive

Xref: sserve comp.os.386bsd.bugs:2342 comp.os.386bsd.questions:11636
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!news.Hawaii.Edu!ames!hookup!swrinde!gatech!newsxfer.itd.umich.edu!ncar!asuvax!chnews!ornews.intel.com!news.jf.intel.com!ichips.intel.com!steve
From: steve@ichips.intel.com (Steve Willoughby)
Newsgroups: comp.os.386bsd.bugs,comp.os.386bsd.questions
Subject: Floating point bug in FreeBSD?
Date: 13 Jul 94 17:16:50 GMT
Organization: Intel Corporation
Lines: 29
Message-ID: <steve.774119810@ichips.intel.com>
NNTP-Posting-Host: pdx840.intel.com

Sorry if this has been talked about before, but I just started reading the
newsgroup.  I saw someone mention libm bugs in a previous article, and was
wondering if that's related to a problem I'm seeing on my FreeBSD box.

When I compiled Perl on my box (which is in itself odd--I got FreeBSD from
the FTP server at cdrom.com, and it installed perfectly, but the apps like
ghostscript, perl, etc that I also downloaded binaries for from cdrom.com
wouldn't run--they complained about running on the "wrong architecture")
anyway, I got the sources to Perl and Ghostscript on my own and compiled
them, only to find that Perl thinks the square root of 2 is 2 :), and 
ghostscript gets a "range error" in the initialization phase (I assume
while setting up the halftone screens in gs_init.ps or somesuch).

I wrote a quick C program using the supplied gcc compiler, and it too
thinks sqrt(2)==2.  Sound familiar to anyone?  hardware FP problem?
gcc bug? libm error?

The machine is a 386.  uname -a says, if I'm reading this correctly, that
the version of FreeBSD is 1.0.2 GENERICBT#0 i386.

I'm considering going with 1.1.5.1 now, but I'd like to know if that'll
really solve my problem.

Thanks for any help you can offer.
-- 
Steve Willoughby           Intel Corporation                 GCS d-- -p+ c+++
Unix Systems Administrator Microprocessor Prod. Group (MD6)  l+ u++ e* m++@
MD6 Unix E-mail Postmaster 2111 NE 25th Ave, M/S JF1-22      s--/+ n++ h- f+
steve@ichips.intel.com     Hillsboro, OR 97124 503 696-4736  g+ w+ t+++ r++ y