Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [TI-B] Quadratic Equation Resolving Formula  (Read 5501 times)

0 Members and 1 Guest are viewing this topic.
[TI-B] Quadratic Equation Resolving Formula
« on: November 16, 2006, 10:47:14 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2690

My teacher said before we buy the graphic calculators that there could be installed programs, and she gave an example: a program which uses the Quadratic Equation Resolving Formula... And yesterday I started to learn how to program in my TI-84, this morning while eating Cheerios I made it.
Feel free to use and edit it. I did this just for fun (and maybe show-off in school *cough*cough*)
It is in TI-Basic language and it is compatible with Ti-83, Ti-84 (Plus and SE), but I'm sure it works on more Ti models.

Version 1.0
Code: [Select]
ClrHome
Prompt A
Prompt B
Prompt C
Disp ((-B+√(B^2-4AC))/2A)
Disp ((-B-√(B^2-4AC))/2A)

Example:
A=?1
B=?-5
C=?4
                                4
                                1
                           Done

Version 1.1
Code: [Select]
ClrHome
Prompt A
Prompt B
Prompt C
If A^2+B+C=0
Then
Disp ((-B+√(B^2-4AC))/2A)
Disp ((-B-√(B^2-4AC))/2A)
Else
Disp "IMPOSSIBLE
End
« Last Edit: November 22, 2006, 09:15:58 pm by Ricky »
Logged

Goodnight

Once and future Captain
Re: [TI-B] Quadratic Equation Resolving Formula
« Reply #1 on: November 16, 2006, 11:13:56 pm »
  • With a Capital G
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 706
Ahh, I haven't used those calculators in years...

Do you know if there is any way to loop back to the prompts if a=0 or 4ac>b^2?
Logged

cpprograms

Banned
Re: [TI-B] Quadratic Equation Resolving Formula
« Reply #2 on: November 16, 2006, 11:51:28 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 429
I can answer that
Add
Code: [Select]
Lbl AT
before the rest of the program, then at the end do
Code: [Select]
If a==0
Goto AT

I love TI basic...

If you need a tutorial, I strongly suggest http://odin.prohosting.com/mjs2k/tutorials/83b/part1.htm mjs2000's tutorial. Sadly he's discontinued his site but that tutorial lives on. It's incredibly good.

Have fun with TI-Basic :D
Logged
  • cpprograms
Re: [TI-B] Quadratic Equation Resolving Formula
« Reply #3 on: November 17, 2006, 03:02:50 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2690
Wow... Thanks for the tutorial :D The one I'm currently using doesn't go as far as that one :)
Logged
Re: [TI-B] Quadratic Equation Resolving Formula
« Reply #4 on: November 22, 2006, 07:20:27 pm »
  • Am i here or am i not?...
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 238
oh.......i am learning how to program on a commodore 64 its fun!! =)
its my dads.....i used it cuz my comp is dead....
Logged
Re: [TI-B] Quadratic Equation Resolving Formula
« Reply #5 on: November 22, 2006, 09:20:00 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2690
oh.......i am learning how to program on a commodore 64 its fun!! =)
its my dads.....i used it cuz my comp is dead....
Until now I've thought of Commodore 64 as a console system (since I didn't know about it), but after some research I came to know what C64 really is >_>
It must rule to program in front of the television xD
By the way, I've updated the program during today's class, it now says in case the condition A^2+B+C=0 is false, and tells if it is impossible :)
Logged
Re: [TI-B] Quadratic Equation Resolving Formula
« Reply #6 on: November 22, 2006, 09:26:53 pm »
  • Fear my Blades
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 562
Ah, I programmed on my TI-83+ when I got it..  I got quite good at it, I even made a small RPG style fighting game for it.
Logged

I've done it (sorta)!  Bloom Lighting in GameMaker, and 3D mode too!  Check out the awesome Screen Saver.
  • Kousou Games
Re: [TI-B] Quadratic Equation Resolving Formula
« Reply #7 on: November 22, 2006, 09:30:22 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2690
Ah, I programmed on my TI-83+ when I got it..  I got quite good at it, I even made a small RPG style fighting game for it.
Who knows? Maybe it's the one I got totally addicted to, until I got lvl 50. It wasn't...hmm... Adventure of Dot RPG (Aodot), wasn't it? xD
Logged
Re: [TI-B] Quadratic Equation Resolving Formula
« Reply #8 on: November 22, 2006, 09:40:06 pm »
  • Fear my Blades
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 562
Nah, I never realeased it.  I did release a tic-tac-toe game though, it had a decent selection of difficulty levels, including impossible which I'm pretty sure by the laws of tic-tac-toe you could only ever get as good as a tie with it.
Logged

I've done it (sorta)!  Bloom Lighting in GameMaker, and 3D mode too!  Check out the awesome Screen Saver.
  • Kousou Games

mit

Re: [TI-B] Quadratic Equation Resolving Formula
« Reply #9 on: November 26, 2006, 12:20:29 am »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
Mm, I made a version of this program a while back, it was very useful indeed.

And Atrius, that's nothing. I made a guess-the-number game, so there. I set the maximum number to 99999999, and gave it to my friend who took ages to get it. Pure brilliance.

Tic-tac-toe is probably a *tad* harder to make than guess-the-number...
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: [TI-B] Quadratic Equation Resolving Formula
« Reply #10 on: November 26, 2006, 12:24:52 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 123
It's hard typing in all those on a graphing calculator. I actually made my own quadratic program last Tuesday, wasn't that hard. Maybe I'll add something like the discriminant, and add the if(a=0) part.

I also remember making a loading program where it simulates loading. The only problem I had with it was that the boxes were uneven, but it does work.
Logged
Re: [TI-B] Quadratic Equation Resolving Formula
« Reply #11 on: December 10, 2006, 09:22:17 pm »
  • w00t
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1983
Here's one I've made for the same purpose:
Code: [Select]
Lbl ST
ClrHome
a+bi
fix 3
Prompt A,B,C
If A != 0
Then
((-B+SQROOT(B^2-4AC))/(2A)) -> Q
((-B-SQROOT(B^2-4AC))/(2A)) -> R
Disp Q>Frac, R>Frac
Real
Float
Else
If A=0
Then
Disp "TRY AGAIN"
Pause
Goto ST

It's longer, but more functional.  This one will calculate imaginary values as well, displaying all results in fraction form if possible, otherwise rounding to 3 decimal places.

Explanation of symbols I used:
a+bi and Real can be found in the Mode menu, as can Fix 3 and Float. 
!= means "not equal to" and can be found in the Test menu (2nd Math). 
-> means "store as" and is the button right above the "On" key.
SQROOT is obviously the square root symbol, while ^2 is "squared"
The placement of parenthesis is critical, as I want the entire calculation to be done before storing the result as a variable, so make sure you use the right number of parenthesis at the right place.

EDIT:  Crap, 2 weeks since the last post.  Didn't realize that I was gravedigging here.  It was only the fourth topic down, so I didn't bother to check the time of the last post.  Sorry about that =/
« Last Edit: December 10, 2006, 09:28:27 pm by dantheman »
Logged
What do you mean I need a life?  =P  Hm... Lives... Isn't that something that you get in Super Mario Bros?  You know, those green mushrooms?  That's a life, right?



My one and only fangame, Link Maze, may be viewed at http://www.zfgc.com/forum/index.php?topic=82.0
  • Link Maze - Zelda mini fangame
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.271 seconds with 62 queries.

anything