Post Reply 
(35S ALG) Ruffini Polynomial Division
06-13-2022, 01:05 PM (This post was last modified: 06-13-2022 03:09 PM by Albert Chan.)
Post: #17
RE: (35S ALG) Ruffini Polynomial Division
(06-12-2022 08:31 PM)Thomas Klemm Wrote:  \(
(2x^4 -5x^2 -2x -1) \div (x-2)
\)
...
Thus we get \(2x^3+4x^2+3x+4\) and the remainder \(R=7\).

We can use multiply key, instead of a program.
Horner's rule to get f(x=2), intermediates are quotient coefs.

Code:
2 [Enter] [Enter] [Enter] 
2            // 2 
[×] 0 [+]    // 4
[×] 5 [-]    // 3
[×] 2 [-]    // 4
[×] 1 [-]    // 7 = f(2)

Comment: if we don't expect coefs to be huge, we can use other base, instead of x:
Example, let base x = 1000

lua> (2e12 - 5002001) / (1000-2)
2004003004.007014

Remainder = .007014 * (1000-2) = 7 (round to integer)
Quotient = 2*x^3 + 4*x^2 + 3*x + 4
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (35S ALG) Ruffini Polynomial Division - Albert Chan - 06-13-2022 01:05 PM



User(s) browsing this thread: 1 Guest(s)