# TITLE: Synthetic Division # AUTHOR: Roy F.A. Maclean # EMAIL: rfamgm at gmail # WEB: http://www.spiderpixel.co.uk/caspro # DATE: 26Mar1996, 9850version:15Feb1998, 22May1999 # MAKE: CASIO # MODEL: 9850 # SIZE: 134 # 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. # # 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. # use A+1->Dim List 1 on models # with autodimension capability # instead of line starting Seq(. @@ Program "SYNTHDIV" Lbl 0 "DEG"?->A:"ROOT"?->B "COEFFS" Seq(0,X,1,A+1,1->List 1 For 1->C To A+1 ?->List 1[C Next 0->D For 1->C To A+1 C=A+1=>"REM" List 1[C]+D_ B*Ans->D Next Goto 0