KVADRATIC EQUATION Description : Solve kvadratic equation also in complex. Inputs : Coeficients A,B,C stored in variables A,B and C. Outputs : Roots of A*X^2+B*X+C=0 \START81\ \NAME=KVADR\ \FILE=TI81_0.PRG\ B\^2\-4AC\->\D \(-)\B/2/A\->\E If D\<=\0 Goto 1 \SquareRoot\D/2/A\->\D Disp "Roots X1,X2=" E+D\->\X Disp X E-D\->\X Disp X End Lbl 1 If D<0 Goto 2 Disp "DOUBLE ROOT X=" Disp E End Lbl 2 Disp "COMPLEX ROOTS" Disp E Disp " +/- I*" \SquareRoot\\(-)\D\->\D Disp D End \STOP\ 158 bytes length, use A,B,C,D,E variables.