*BSD News Article 20902


Return to BSD News archive

Xref: sserve comp.os.386bsd.apps:435 comp.os.386bsd.bugs:1391
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!usc!sol.ctr.columbia.edu!destroyer!mudos.pc.cc.cmu.edu!mudos.pc.cc.cmu.edu!not-for-mail
From: mju@mudos.pc.cc.cmu.edu (Marc Unangst)
Newsgroups: comp.os.386bsd.apps,comp.os.386bsd.bugs
Subject: Re: Bugs in FP emulator (was Re: Perl-4.036?)
Date: 13 Sep 1993 12:55:48 -0400
Organization: The Programmers' Pit Stop, Pittsburgh, PA
Lines: 22
Message-ID: <2728n2$bsn@mudos.pc.cc.cmu.edu>
References: <26fptu$1q1@terminator.rs.itd.umich.edu> <26g7srINNppg@xs4all.hacktic.nl> <CD9Dy6.B51@hippo.ru.ac.za> <2724fl$8fd@pdq.coe.montana.edu>
NNTP-Posting-Host: localhost.pc.cc.cmu.edu

nate@bsd.coe.montana.edu (Nate Williams) writes:
>Hmm, never had a problem with the 'exp' tests..   See below.

I believe the problem with the 'exp' tests under Perl is related
to problems in the floating-point emulator.  On a system without
hardware floating-point (486SLC/25), the following program prints
"sqrt(2) = 2.000000".  On a system with hardware floating-point
(486DX/33), it prints "sqrt(2) = 1.414214".  Both systems are running
NetBSD 0.9 with the distributed versions of gcc 2.4.5 and npx.

/* test program to demonstrate bug in FP emulator */
#include <stdio.h>
#include <math.h>

main() {
	printf("sqrt(2) = %lf\n", sqrt(2.0));
}

-- 
Marc Unangst, N8VRH         | "Free software is NOT the same thing as
mju@mudos.pc.cc.cmu.edu     |  free beer."
                            |     -Philip Knapp in comp.os.linux