Rewriting polynomials for computers

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
octohydra
Messages
7
Reaction score
0
Suppose I have a REALLY big polynomial:
[tex]a_0 + a_1 x + a_2 x^2 + a_3 x^3+a_4 x^4+ \cdots + a_n x^n[/tex]
I can rewrite the polynomial as a combination of multiplication and addition operators (instead of exponents) that a computer tends to like as such:
[tex]a_0 + x \left( a_1 + x \left( a_2 + x \left( a_3 + x \left(a_4 + \cdots + a_n x \left)\right. \cdots \right)\right)\right)\right)[/tex]

  • Does this process have a name?
  • Is there an algorithm to do this?
  • Is there an implementation of this on Sage or MATLAB/Octave or Mathematica?
 
Physics news on Phys.org
I believe this is called Horner's Rule. I'm sure there's an algorithm, but I don't recall what it is. Check online for more information about it.

I don't know what MATLAB and the others have for Horner's Rule.
 
Mark44 said:
I believe this is called Horner's Rule. I'm sure there's an algorithm, but I don't recall what it is. Check online for more information about it.

I don't know what MATLAB and the others have for Horner's Rule.


http://en.wikipedia.org/wiki/Horner_scheme"

Thanks! The information at the wiki page is more than plenty for me.
 
Last edited by a moderator: