Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Topic: Fast exponent and logarithm, given initial estimate
Replies: 29   Last Post: Nov 8, 2004 2:31 AM

 Messages: [ Previous | Next ]
 George Russell Posts: 157 Registered: 12/6/04
Re: Fast exponent and logarithm, given initial estimate
Posted: Oct 20, 2004 4:30 AM

Glen Low wrote (snipped):
&gt; Still, I find it intriguing that you can evaluate a polynomial of
&gt; degree 6 with just 4 multiplications (instead of 5)... any sample
&gt; code? (It might save me a multiplication if I use x * 2^-2 on a degree
&gt; 6 polynomial...)

For degree 6, you can evaluate a real polynomial in x using 4 multiplications and

z = (x + a0)*x + a1
w = (x + a2)*z + a3
the value of the polynomial = ((w + z + a4)*w + a5) * a6

You need to solve a cubic equation to work out the constants a0-a6 given the initial
coefficients; however there will always be a real solution.

You mentioned fused multiply-adds. This algorithm requires
4 multiplies/fused multiply-adds and just 4 additions. I don't know if you can
get the number of additions down even further.

Date Subject Author
10/18/04 Glen Low
10/18/04 Jeremy Watts
10/19/04 Peter Spellucci
10/19/04 Glen Low
10/18/04 bv
10/19/04 Glen Low
10/19/04 George Russell
10/19/04 Glen Low
10/20/04 George Russell
10/20/04 Glen Low
10/21/04 Christer Ericson
10/21/04 Glen Low
10/22/04 Christer Ericson
10/19/04 Martin Brown
10/19/04 Glen Low
10/19/04 Richard Mathar
10/19/04 Glen Low
10/20/04 Gert Van den Eynde
10/20/04 Glen Low
10/20/04 Richard Mathar
10/21/04 Gert Van den Eynde
10/21/04 bv
10/22/04 Glen Low
10/22/04 Peter Spellucci
10/22/04 Glen Low
10/23/04 bv
10/24/04 Gert Van den Eynde
10/25/04 Peter Spellucci
10/20/04 Gert Van den Eynde
11/8/04 Glen Low