\START82\ \COMMENT=Program file dated 12/04/95, 15:54 \NAME=BISECT \FILE=BISECT.82P ClrHome Disp "FIRST ENTER \Y1\" Disp "" Disp "THEN HIT ENTER" Pause ClrHome 0\->\I Disp "ENTER LEFT EDGE" Prompt L Disp "ENTER RIGHT EDGE" Prompt R Lbl 1 ClrHome (L+R)/2\->\M \Y1\(M)\->\P \Y1\(L)\->\Q \Y1\(R)\->\S If Q>0 Then Output(1,1,"LEFT EDGE Y POS") Else Output(1,1,"LEFT EDGE Y NEG") End Output(2,1,"X = ") Output(2,5,L) If P>0 Then Output(3,1,"MIDPOINT Y POS") Else Output(3,1,"MIDPOINT Y NEG") End Output(4,1,"X = ") Output(4,5,M) If S>0 Then Output(5,1,"RIGHT EDGE Y POS") Else Output(5,1,"RIGHT EDGE Y NEG") End Output(6,1,"X = ") Output(6,5,R) If (((S>0) and (P>0)) or ((S<0) and (P<0))) M\->\R If (((Q>0) and (P>0)) or ((Q<0) and (P<0))) M\->\L If P=0 Then ClrHome Disp "ROOT =",M Stop End I+1\->\I Output(7,1,"ITERATION=") Output(7,11,I) Output(8,1,"HIT ENTER") Pause Goto 1 \STOP82\