Fraction calculator: exact, mixed, decimal — a TI-89 Titanium program
FRAC89 is a TI-89 BASIC program for the TI-89 Titanium. Add, subtract, multiply or divide two fractions exactly (pick the operation from a pop-up): the result in lowest terms, its numerator and denominator, as a mixed number, as a decimal, and the least common denominator.
What it asks for and what it shows
It asks for 2 values at its prompts, after you pick option 1 from its menu. In the example below it shows RESULT, NUM, DEN, DECIMAL, LCD, MIXED.
Example run
One of its oracle test cases: “3/4 + 5/6 = 19/12 = 1 7/12”. The inputs are typed in order, and the results are the values the case expects on the screen.
| Step | Value |
|---|---|
| You enter | |
| Menu | option 1 |
| Input 1 | 3/4 |
| Input 2 | 5/6 |
| The screen shows | |
RESULT= | 19/12 |
NUM= | 19 |
DEN= | 12 |
DECIMAL= | 1.583333333 |
LCD= | 12 |
MIXED= | 1 7/12 |
How it's checked
5 test cases, each checked against an independent method. Replayed key by key on a virtual TI-89 Titanium, they make 37 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 “Fraction calculator: exact, mixed, decimal” (FRAC89).
- 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
- Matrix inverse, exact
- Quadratic roots, exact when possible
- Prime factorization and divisors
- LU decomposition with pivoting (exact)
All TI-89 Titanium math programs · All TI-89 Titanium programs