You have not uploaded your program! Please edit the page to upload your program.
|
|||||||||||||||
This is the optimized version of my previous quadratic program. The functions are the same, but there are no errors and it is much more compact. This is a program where you input A,B, and C and it calculates the vertex of the parabola and then the roots (if any). If there are two roots they all be listed, if there is one root, it will be listed twice. If there are no roots, you will get imaginary numbers. As well as calculating these values, it also graphs the equation (stored into Y1). This is not shown in the program, but can be viewed after exiting. The program also includes a list of equation forms and a square root finder for calculating discriminants. It does not require anything other than a few variables to run. The program is not locked. |
What the community thinks:
Here is the code:
What do you get when you multiply six by nine? Forty-Two.
My Projects
My best work so far
Here are some necessary revisions:
- The calculator's interpreter reads 1/2A as (1/2) * A, so the vertex and root calculations will only work if the leading coefficient, A, of your quadratic is 1
- Additionally, the formula for the vertex of a parabola is: x = -b/2a,
and that of the roots is: x = (-b ± √(b²-4ac))/2a, whereas in both situations your b in the numerator was incorrectly left positive.
Beyond that, here are some unnecessary but useful revisions to increase speed and decrease size:
- Don't display text and then pause on that same text. in other words,
- There are a lot of unnecessary ClrHome commands. The only useful one is right after the Lbl A and maybe right after Real
- It's really not necessary to DelVar every variable you used, especially since this is a math program, after which it might be useful to be able to check the value of a, b, c, s, v, or w after execution has ended.
- Return is not necessary at the end; it's not likely that any other program would call this program (But now I'm just being picky, so I'll stop now)
I dont have a good connection, but sqrrt is meant to be the square root symbol
Can be simplified to:
The -B/2A, missing negative in the quadratic formula, and the missing negative in the disp W pause W were all a copy paste glitch, but they are correct in the program. Thanks for the space saving tips though.
What do you get when you multiply six by nine? Forty-Two.
My Projects
My best work so far
Here's the fastest/smallest program I can muster for calculating quadratic roots/vertices:
Not very user-friendly, but it's a quick-and-dirty quadratic solver nonetheless.
Tell me if I missed anything else!
What do you get when you multiply six by nine? Forty-Two.
My Projects
My best work so far
you should add a menu option for graphing the equation. it'd be simple though, just drawf ax2+bx+c and some commands to adjust the window dimensions depending on where the parabola is if you wanted to
nevermind i didnt realize this post was over a year old lol i thought it said april 12 2017