Re: Synthetic Division Program for the 82


[Prev][Next][Index][Thread]

Re: Synthetic Division Program for the 82



> The big translating question I have also concerns with in extending this
> program is in looking at testing complex roots.  The 85 can handle Complex
> Numbers, but I don't know how well, or if well enough to run through a
> program like this.  Second, the 83 can as well, but I don't know if you
> can put an imaginary number in a List on an 83.


The 85 can do *anything* w/ a cplx.  well.. almost. It wont choke doing
synth division, though.  The xlation is done for the 85. Sorry... I'm
running UNIX on a RS6000 now (awwwwww) so I don't have my graphlink handy.
here it is asciified...


PROGRAM:SYNTHDIV
:Lbl C
:ClLCD
:{0}->L5:0->L6
:Disp "ENTER DEGREE OF"
:Input "POLYNOMIAL ",N
:N+1->dimL L5
:N+1->dimL L6
:Disp "Enter coefficients","as a list:"
:Input L5
:End
:Lbl A
:Disp "ROOT TO TEST?"
:Input X
:L5(1)->L6(1)
:For(J,1,N,1)
:L6(J)*X->M
:L5(J+1)+M->L6(J+1)
:End
:L6(N+1)->R
:Disp "REMAINDER = ",R
:Pause
:Lbl E
:Disp "Now What?"
:Menu(1,"Change",A,2,"Root",A,3,"COEFFS",B,4,"NEW",C,5,"END",D)
:Lbl B
:Disp "BOTTOM ROW AFTER"
:Disp "SYNTH DIVISION"
:Disp L6>Frac
:Disp "LAST DIGIT IS"
:Disp "REMAINDER."
:Disp "SEE L6 FOR FULL"
:Disp "ROW IF CUT OFF."
:Pause
:Goto E
:Lbl D
:ClLCD


<pre>
--
Chris Kuethe <ckuethe@gpu.srv.ualberta.ca> LPGV Electronics and Controls
http://www.ualberta.ca/~ckuethe/
RSA in 2 lines of PERL: http://www.dcs.ex.ac.uk/~aba/rsa/
print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",<>
)]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"|dc`
</pre>


References: