So, I found a program for a TI84 Plus and used this website to convert it from .8xp to raw TIBASIC format, and the code works perfectly in this website's emulator, but I get an overflow error when I try using it on my physical calculator. Here is the code:

Code:
ClrHome
PlotsOff
FnOff
ClrDraw
AxesOff
ZStandard
For(L,0,18)
   Text(~1,10,L," Equation")
End
For(M,54,30,~1)
   Text(~1,18,M,"Solver")
End
"By: Nigel Hou   "->Str1
Text(~1,40,10,Str1)
Text(50,24,"PRESS ANY KEY")
0->K
While K=0
   getKey->K
End
ClrDraw
Line(~7,1,7,1)
Line(~7,~2,7,~2)
Line(~7,1,~7,~2)
Line(7,1,7,~2)
Text(20,35,"Loading..\.")
For(P,16,78)
   Pxl-On(30,P)
   Pxl-On(31,P)
   Pxl-On(32,P)
   Pxl-On(33,P)
   Pxl-On(34,P)
   Pxl-On(35,P)
End
Lbl theta
Float
Menu("Pick type","Binomial",Z1,"Trinomial",Z2)
Lbl Z1
If L!=19 or P!=79
Goto Z4
Disp "ax+b=c"
Disp ""
Input "a=",A
Input "b=",B
Input "c=",C
Output(7,1,"x=")
Output(7,3,(C-B)/A)
Pause
ClrHome
Goto Z3
Lbl Z2
If L!=19 or P!=79 or inString(Str1,"l")!=9
Goto Z4
Menu("Pick ans. type","Rea\l",RA,"Complex",IA)
Lbl RA
Disp "ax^^2+bx+c=0
Disp ""
Input "a=",A
Input "b=",B
Input "c=",C
If B^^2-4AC<0
Then
   Disp "Error: nonreal"
   Disp "ans."
   Pause
   ClrHome
   Goto Z3
End
(~B+sqrt(B^^2-4AC))/(2A)->X
Output(7,1,"x=")
Output(7,3,X)
(~B-sqrt(B^^2-4AC))/(2A)->Y
If Y!=X
Then
   Output(8,1,"x=")
   Output(8,3,Y)
End
Pause
ClrHome
Goto Z3
Lbl IA
a+bi
Fix 4
Disp "ax^^2+bx+c=0
Disp ""
Input "a=",A
Input "b=",B
Input "c=",C
(~B+sqrt(B^^2-4AC))/(2A)->X
Output(7,1,"x=")
Output(7,3,X)
(~B-sqrt(B^^2-4AC))/(2A)->Y
If Y!=X
Then
   Output(8,1,"x=")
   Output(8,3,Y)
End
Pause
ClrHome
Lbl Z3
Menu("Use again?","Yes",theta,"No",Z4)
Lbl Z4
Float
Real
AxesOn



Keep in mind that this program is NOT mine, I was just converting it into TIBASIC because I don't have a data cable that can plug into my TI-84 and transfer programs.
There’s nothing mathematically wrong with the program. The only reason you’d get an overflow error is if your input values are too large.
What values did you enter to get an overflow error? Which line did it point at if you chose 2:Goto?
I get an overflow error upon selecting the first choice in the menu that pops up.
KermMartian wrote:
What values did you enter to get an overflow error? Which line did it point at if you chose 2:Goto?

It points to "or P!=79", specifically on the factorial symbol.
EDIT: If I choose the first menu option: "Binomial", it goes to the first "P!=79". If I choose the second menu option, "Trinomial", it goes to the second "P!=79".
bigj3333343 wrote:
KermMartian wrote:
What values did you enter to get an overflow error? Which line did it point at if you chose 2:Goto?

It points to "or P!=79", specifically on the factorial symbol.

Those shouldn’t be factorials. Anywhere you see != in the code should be a “not equal to” sign instead.

There are several lines in the code like this that are honestly completely useless, but I won’t get into that
Oh, that makes sense. Thanks
When I saw it, I assumed it was factorial, just like I didn't know that the "~" symbol meant a negative (-) symbol until I looked it up.
EDIT: Just tried it with "not equals" signs and it works perfectly!
Thanks!
Ah, I didn’t know you were typing this into your calculator by hand. In that case, there are some other things you’ll probably want to watch out for, such as the “^^2” is not 3 separate symbols but just one “squared” exponent symbol, thus the 2. I’ll assume you’ve figured out the rest but let me know if you have any more issues
Ok, Thanks!
  
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
Page 1 of 1
» All times are UTC - 5 Hours
 
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

 

Advertisement