Rewriting polynomials for computers

In summary, the conversation discusses rewriting a polynomial using multiplication and addition operators instead of exponents, known as Horner's Rule. It is mentioned that there is an algorithm for this process and it can be implemented in various software such as Sage, MATLAB, and Mathematica. The conversation also suggests checking online for more information about Horner's Rule.
  • #1
octohydra
7
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?
 
Mathematics news on Phys.org
  • #2
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.
 
  • #3
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:

1. What is the purpose of rewriting polynomials for computers?

The purpose of rewriting polynomials for computers is to simplify and optimize the representation of polynomials so that they can be easily manipulated and computed by computer algorithms. This involves converting the polynomial into a standard form, such as a monomial or a polynomial with descending powers, to reduce the number of operations needed for computation.

2. What are the main challenges in rewriting polynomials for computers?

The main challenges in rewriting polynomials for computers include identifying the correct standard form for the polynomial, handling different notations and formats, and dealing with potential errors or inaccuracies in the polynomial. There may also be challenges in efficiently handling large or complex polynomials and ensuring numerical stability in the computation process.

3. How do computers handle variables and coefficients in polynomials?

Computers typically represent variables and coefficients in polynomials using binary numbers, either as integers or floating-point numbers. The variables are assigned a numerical value, while the coefficients are stored in memory and used in mathematical operations to compute the polynomial.

4. Can rewriting polynomials for computers affect the accuracy of the results?

Yes, rewriting polynomials for computers can potentially affect the accuracy of the results. This is because the process of converting the polynomial into a standard form may involve rounding or approximations, which can introduce errors into the computation. However, these errors can be minimized by using appropriate algorithms and techniques.

5. Are there any specific programming languages or tools for rewriting polynomials?

There are no specific programming languages or tools designed solely for rewriting polynomials. However, there are mathematical libraries and software packages that provide functions and methods for polynomial manipulation and computation, such as MATLAB, Mathematica, and NumPy. Additionally, many programming languages have built-in data types and operations for handling polynomials, such as Python's polynomial class and R's poly() function.

Similar threads

Replies
1
Views
797
Replies
3
Views
2K
Replies
4
Views
823
Replies
6
Views
929
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • General Math
Replies
2
Views
1K
Replies
3
Views
735
Replies
8
Views
1K
Replies
7
Views
826
Back
Top