Given today's pipelined arithmetic units and optimizing compilers,
Horner's rule may not be the fastest way to evaluate the polynomial,
because it only executes one addition or multiplication at a time, in
sequential order. Rearranging the polynomial may give more
opportunities for parallelism, and thus speed up execution.

For example, the polynomial y = a + b*x + c*x^2 + d*x^3 + e*x^4 +
f*x^5, where ^ represents "to the power," might be evaluated faster if
it is written

t = x * x;
y = (a + t * (c + e * t)) + x * (b + t * (d + f * t));

because the two expressions in the outer parentheses may be evaluated
simultaneously.

Dave

On Aug 22, 11:58 pm, SAMM <[email protected]> wrote:
> horner's  rule
>
> On 8/23/11, saurabh agrawal <[email protected]> wrote:
>
> > Compute a+bx2+cx3+dx4+... efficiently (a,b,c...given)
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.
>
> --
> Somnath Singh

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to