This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Optimize x*x*x*x*x*x using 3 multiplications.
- From: dewar at gnat dot com (Robert Dewar)
- To: kenner at vlsi1 dot ultra dot nyu dot edu, matz at suse dot de
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 1 Aug 2003 00:17:40 -0400 (EDT)
- Subject: Re: [PATCH] Optimize x*x*x*x*x*x using 3 multiplications.
> Optimize x*x*x*x*x*x using 3 multiplications.
It is interesting to note that in general this kind of optimization decreases
accuracy (it is more accurate to do the full 5 multiplications). Nevertheless
it is probably reasonable. In Ada 83, this optimization is in fact not
permitted, since it is not guaranteed to have sufficient accuracy. Ada 95
deliberately relaxed this accuracy rule to allow this kind of optimization.