E-Code

LU decomposition of a typed matrix — a TI-89 Titanium program

By E-Code · updated

MLU89 is a TI-89 BASIC program for the TI-89 Titanium. Type a square matrix: PA = LU with partial pivoting — the row order, L and U row by row in exact fractions, and the determinant.

What it asks for and what it shows

It asks for 1 value at its prompts. In the example below it shows DET, ROW ORDER P, L1, L2, L3, U1, U2, U3.

Example run

One of its oracle test cases: “3x3 with a row swap”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 1[[2,1,1][4,-6,0][-2,7,2]]
The screen shows
DET=-16
ROW ORDER P={2 1 3}
L1={1 0 0}
L2={1/2 1 0}
L3={-1/2 1 1}
U1={4 -6 0}
U2={0 4 1}
U3={0 0 1}

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 56 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-89 Titanium math programs · All TI-89 Titanium programs