# TITLE: Synthetic Division
# AUTHOR: Roy F.A. Maclean
# EMAIL: [email protected]
# WEB: http://members.tripod.co.uk/rfam
# DATE: 26Mar1996
# MAKE: CASIO
# MODEL: fx6300G or greater
# SIZE: 98
# NOTES:
# Synthetic division
means dividing one polynomial by a
# linear factor.
# The inputs are the
degree of the polynomial,the root of the
# dividing factor and
the coefficients of the polynomial.
# The constraints are:
1<=deg<=22, root must be nonzero.
# If you want to increase
the maximum degree allowed then use
# a defm command at
beginning. e.g. to go to deg=25 use Defm 3.
#
# example - to divide
(x^2+2x+1) by (x+1)
#
enter '2' as the degree
#
enter -1 as the root (-1 is the root of (x+1) )
#
enter 1 2 1 as the coefficients (each at separate prompt)
#
#
The program returns 1 1 REM 0
#
This means that (x^2+2x+1)/(x+1)=x+1 rem 0
#
#
Whenever you get remainder zero then the root you entered
#
is a root of the first polynomial.
@@ Program 1
Lbl 0:Mcl
"DEG"?->A:"ROOT"?->B
A+1->C:"COEFFS"
Lbl 1
?->F[A-C]
Dsz C:Goto 1
A+1->C
Lbl 2
C=1=>"REM"
F[A-C]+D_
B*Ans->D
Dsz C:Goto 2
Goto 0