AP Newton
1. ClrHome
2. Disp "F(X)=
3. Input "",Str1
4. Str1->Y
5. Disp "----------------","F'(X)=
6. Input "",Str1
7. Str1->Y
8. Disp "----------------","RANGE
9. Input "MIN: ",D
10. Input "MAX: ",E
11. 0->dim(L
12. D-rand->A
13. E-rand->B
14. (B-A)/37->C
15. For(Y,A,B,C
16. Output(8,4,"PCT DONE
17. Y-C->X:Y->N:N<0->I
18. Y->X:Y->O:O<0->J
19. Y-C/2->X:Y->K
20. If IJ or (NK and O>K)
21. Then
22. dim(L)+1>dim(L
23. Y-.5C->L(dim(L))
24. End
25. Output(8,1,int(100(Y-A)/(B-A)
26. End
27. Disp "100PCT DONE","----------------"
28. For(Z,1,dim(L
29. L(Z)->X
30. X+5->S
31. While abs(X-S)>.0001
32. X->S
33. X-Y/Y->X
34. End
35. Disp "",int(1000000X)/1000000
36. Output(6,1,"SOL. / "
37. Output(6,5,Z
38. Output(6,8,dim(L
39. Pause
40. End