Related articles |
---|
Multiply by a constant --> shift-and-adds algorithm? Vincent.Lefevre@ens-lyon.fr (Vincent Lefevre) (1997-11-07) |
Re: Multiply by a constant --> shift-and-adds algorithm? rweaver@ix.netcom.com (1997-11-09) |
Re: Multiply by a constant --> shift-and-adds algorithm? preston@cs.rice.edu (1997-11-09) |
Re: Multiply by a constant --> shift-and-adds algorithm? ssolyanik@icdc.com (Sergey Solyanik) (1997-11-09) |
Multiply by a constant --> shift-and-adds algorithm? txr@alumni.caltech.edu (Tim Rentsch) (1997-11-09) |
Re: Multiply by a constant --> shift-and-adds algorithm? n8tm@aol.com (1997-11-11) |
Re: Multiply by a constant --> shift-and-adds algorithm? dube@brachio.IRO.UMontreal.CA (Danny Dube) (1997-11-11) |
Re: Multiply by a constant --> shift-and-adds algorithm? cdg@nullstone.com (Christopher Glaeser) (1997-11-13) |
[4 later articles] |
From: | rweaver@ix.netcom.com (Richard Weaver ) |
Newsgroups: | comp.compilers |
Date: | 9 Nov 1997 12:00:40 -0500 |
Organization: | Netcom |
References: | 97-11-038 |
Keywords: | arithmetic, optimize |
<Vincent.Lefevre@ens-lyon.fr> writes:
>Some compilers (including gcc) are able to convert a "multiply by a
>constant" operation into a sequence of shifts and adds/subtracts. I
>don't know whether or not they find the optimal solution, but after
>a few tests, the algorithm used by gcc seems to be quite good. Where
>can I find such an algorithm or some references about this problem?
Try Richard J. Gillings "Mathematics in the Time of the Pharaohs",
pages 16-19. Published in 1972 by MIT, Dover reprint (with
corrections) 1982.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.