# TITLE: Polynomial Multiplication (Expanding 2 Brackets) # AUTHOR: Roy F.A. Maclean # EMAIL: rfamgm at gmail # WEB: http://www.spiderpixel.co.uk/caspro # DATE: 20Sep96, 9850version:15Jan1998, 18May1999 # MAKE: CASIO # MODEL: 9850 # # Use this program to multiply two polynomials together. # You are asked for the degree of each equation, then the coeffs. # # example: # to multiply (x^2+2x+1)(x^2+2x+1), enter 2 for the the degrees # "Deg 1"? # 2 # "Deg 2"? # 2 # # Then enter the coeffs: 1,2,1 1,2,1 # # Then 1 4 6 4 1 will be displayed # # This shows that the answer is x^4+4x^3+6x^2+4x+1 # # Use 2(A+B)+3->Dim List 1 # on models with autodimension capability # instead of line starting Seq(. @@ Program "POLYMULT" Lbl 0 "D1"?->A:"D2"?->B Seq(0,X,1,2(A+B)+3,1)->List 1 "COEFFS1" For 1->C To A+B+2 C=A+2=>"COEFFS2" ?->List 1[C]:Next For A+1->D To 1 Step -1 For B+2->E To 2 Step -1 A+B+D+E->F List 1[D]List 1[A+E]+List 1[F]->List 1[F] Next:Next For A+B+3->G To 2A+2B+3 List 1[G]_ Next Goto 0