Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Rewriting polynomials for computers

  1. Oct 13, 2010 #1
    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?
     
  2. jcsd
  3. Oct 13, 2010 #2

    Mark44

    Staff: Mentor

    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.
     
  4. Oct 13, 2010 #3

    http://en.wikipedia.org/wiki/Horner_scheme" [Broken]

    Thanks! The information at the wiki page is more than plenty for me.
     
    Last edited by a moderator: May 5, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook