Quadratic roots, exact when possible — a TI-89 Titanium program
QUADR89 is a TI-89 BASIC program for the TI-89 Titanium. Solves ax²+bx+c=0 and keeps rational roots exact (1/2, not .5); reports no real roots or a double root.
What it asks for and what it shows
It asks for 3 values at its prompts. In the example below it shows DISC, X1, X2.
Example run
One of its oracle test cases: “x²-5x+6: rational roots stay exact”. The inputs are typed in order, and the results are the values the case expects on the screen.
| Step | Value |
|---|---|
| You enter | |
| Input 1 | 1 |
| Input 2 | -5 |
| Input 3 | 6 |
| The screen shows | |
DISC= | 1 |
X1= | 3 |
X2= | 2 |
How it's checked
6 test cases, each checked against an independent method. Replayed key by key on a virtual TI-89 Titanium, they make 26 checks.
How E-Code checks every program
Run it or put it on your calculator
- Open the library in the TI-89 Titanium calculator and pick “Quadratic roots, exact when possible” (QUADR89).
- Put it on your own calculator with a computer and a USB cable, or type it in by hand.
Related programs
- Linear system, exact answers
- LU decomposition with pivoting (exact)
- Matrix inverse, exact
- Series partial sums, exact
- Matrix inverse from a typed matrix
All TI-89 Titanium math programs · All TI-89 Titanium programs