Advertisement
NovaYoshi

TI-BASIC Fast root simplifier

Jan 15th, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. replace sqrt with the version of the square root with no parenthesis an X beside it
  2.  
  3. ClrHome
  4. Prompt N
  5. ClrHome
  6. 2->P square root by default
  7. If fPart(N) is there a number past the dot?
  8. Then
  9. fPart(N)*10->P
  10. iPart(N)->N
  11. End
  12. 1->A
  13. 1->B
  14. If not(fPart(PsqrtN
  15. Then
  16. Disp PsqrtN
  17. Stop
  18. End
  19. ClrHome
  20. Lbl R:
  21. Disp {A,B}
  22. For(C,2,15)
  23. C^P->E
  24. If not(fPart(B/E))
  25. Then
  26. Bb/E->B
  27. A*C->A
  28. Goto R
  29. End
  30. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement