Related articles |
---|
Problems with Hardware, Languages, and Compilers hrubin@stat.purdue.edu (1997-03-07) |
Re: Problems with Hardware, Languages, and Compilers nmm1@cus.cam.ac.uk (1997-03-09) |
Re: Problems with Hardware, Languages, and Compilers hbaker@netcom.com (1997-03-09) |
Re: Problems with Hardware, Languages, and Compilers mw@ipx2.rz.uni-mannheim.de (1997-03-09) |
Re: Problems with Hardware, Languages, and Compilers rideau@ens.fr (Francois-Rene Rideau) (1997-03-14) |
Re: Problems with Hardware, Languages, and Compilers smryan@mail.com (1997-03-14) |
Re: Problems with Hardware, Languages, and Compilers rideau@ens.fr (Francois-Rene Rideau) (1997-03-16) |
Re: Problems with Hardware, Languages, and Compilers robison@kai.com (Arch Robison) (1997-03-16) |
[5 later articles] |
From: | nmm1@cus.cam.ac.uk (Nick Maclaren) |
Newsgroups: | comp.compilers,comp.lang.misc,comp.arch.arithmetic |
Date: | 9 Mar 1997 11:29:44 -0500 |
Organization: | University of Cambridge, England |
References: | 97-03-037 |
Keywords: | design |
Herman Rubin <hrubin@stat.purdue.edu> wrote:
>...
> Hardware on the "cutting edge" can use a table lookup to start
> reciprocal or reciprocal square root, and iterative methods using
> only a few multiplications and additions to get accurate values for
> these. The same cannot be done for square root.
>
>The compilers available did manage to do x/y as x*(1/y), but as square
>root is recognized and reciprocal square root is not, it was found
>quite difficult to manage the problem on a routine basis.
Now I am lost. If the compiler can handle x/y as x*(1/y), why on earth
cannot it handle sqrt(x) as x*(1/sqrt(x))?
In both cases, there is the same slight inefficiency, and the problem of
getting last-bit accuracy (or even near last-bit accuracy). But I assert
that the problems are almost identical for the two cases.
Nick Maclaren,
University of Cambridge Computer Laboratory,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email: nmm1@cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.