Received: (from major@localhost)
	by minnie.cs.adfa.oz.au (8.8.8/8.8.8) id GAA22952
	for pups-liszt; Mon, 11 May 1998 06:42:17 +1000 (EST)
Received: from serv1.is4.u-net.net (hme0.serv1.is4.u-net.net [195.102.240.153])
	by minnie.cs.adfa.oz.au (8.8.8/8.8.8) with SMTP id GAA22947
	for <pups@minnie.cs.adfa.oz.au>; Mon, 11 May 1998 06:42:09 +1000 (EST)
Received: from indy.dunnington.york.ac.uk [195.102.197.20] 
	by serv1.is4.u-net.net with smtp (Exim 1.73 #1)
	id 0yYdEp-0007gr-00; Sun, 10 May 1998 21:02:28 +0000
Received: by indy.dunnington.york.ac.uk (940816.SGI.8.6.9/980207.PNT)
	for pups@minnie.cs.adfa.oz.au id UAA08058; Sun, 10 May 1998 20:47:11 GMT
Date: Sun, 10 May 1998 20:47:11 GMT
From: pete@dunnington.u-net.com (Pete Turnbull)
Message-Id: <9805102147.ZM8056@indy.dunnington.york.ac.uk>
In-Reply-To: "Steven M. Schultz" <sms@moe.2bsd.com>
        "Re: Floating Point-The Results Are In!" (May 10,  9:49)
References: <199805101649.JAA00593@moe.2bsd.com>
Reply-To: pete@dunnington.u-net.com
X-Mailer: Z-Mail (3.2.2 10apr95 MediaMail)
To: pups@minnie.cs.adfa.oz.au
Subject: Re: Floating Point-The Results Are In!
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
Sender: owner-pups@minnie.cs.adfa.oz.au
Precedence: bulk

On May 10,  9:49, Steven M. Schultz wrote:
> Subject: Re: Floating Point-The Results Are In!
>
> > From: Johnny Billquist <bqt@Update.UU.SE>
> > I wouldn't be *that* surprised by these results. For instance, I
believe
> > that longs are implemented with FP. And I wouldn't be surprised if a
few
> > FP ops were sneaked in to compute some stuff that aren't immediately
> > appearant.
>
> 	It is true that _some_ long arithmetic is done using FP.  The long
> 	divide is done that way (at least in 2BSD, I've not looked at V7
> 	yet) because it is much much less code to convert the operands to
> 	FP, do the divide, and then convert the result back (the
alternative
> 	is about two pages of code).

> 	The C compiler itself did NOT generate FP unless the operands were
> 	explicitly FP (float or double).  Most C code was 'int' or 'char *'
> 	and no FP code was needed or used for that.

That bears out what I disovered by accident yesterday -- looking at a 7th
Edition UK source distribution for 11/23's and other small machines.  The
READ_ME file lists the programs that have possible floating point problems,
or which might be too big using emulation.   I can't remember the details,
but the list had a few surprises.

Most of the C programs have very little FP, and that is mostly due to a
small number of library routines that include FP ops, but one or two
programs are exceptional.

For example, 'factor' has a lot of FP at the beginning, a chunk in the
middle, and a large subroutine near the end, which uses FP to compute
square roots using Newton's method.  factor is written in assembler, not C,
and has much more FP than other things I looked at, but several other
programs use a little.

-- 

Pete						Peter Turnbull
						Dept. of Computer Science
						University of York

