I am trying to create and or fix this program I found online to give me simplest radical form output but my TI 84 plus se gives me errors.
Is something wrong with the code?
Code: :1→A
:2→I
:While I{^2}≤abs(R
:While not(fPart(R/I{^2}
:R/I{^2}→R
:AI→A
:End
:I+1+(I>2→I
:End
:ClrHome
:1+int(log(A
:If A≠1
:Output(1,1,A
:Ans-(A=1
:If R<0
:Then
:Output(1,1+Ans,"{i}
:Ans+1
:End
:If 1≠abs(R
:Then
:Output(1,1+Ans,"sqrt(
:Output(1,3+Ans,R((R>0)-(R<0
:End
Can I correctly assume you copy-pasted that from SourceCoder (Cemetech's TI-BASIC editor)? If not, be aware that {^2} is the squared key, the one above [LOG] on your calculator keypad. Similarly, {i} is the imaginary number i, aka [2nd][.]. What line does the error occur on?
Yes, you're correct. I'm aware of that. I just solved the problem by reviewing the code, I was missing an entry at the beginning which stated ( :Prompt R), I'm now able to get answers in radical form. Thank you for your help.
mrjustti wrote:
Yes, you're correct. I'm aware of that. I just solved the problem by reviewing the code, I was missing an entry at the beginning which stated ( :Prompt R), I'm now able to get answers in radical form. Thank you for your help.
No problem. Do make sure that you understand how this program works, of course. That's a key part of learning any new language by playing with existing code, including TI-BASIC. And don't hesitate to ask if there's anything in the program that doesn't make sense to you.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum