The Museum of HP Calculators


Cramer's Rule for the HP-32SII

This program is by Adam Szporer and is used here by permission.

This program is supplied without representation or warranty of any kind. Adam Szporer and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Overview

This program (XEQ K) will solve 3x3 systems of linear equations. Usage: Enter the matrix

	a11x	a12y	a13z	c1
	a21x	a22y	a23z	c2
	a31x	a32y	a33z	c3

in the following registers

	B	C	D	E
	H	I	J	K
	M	N	O	P

Run XEQ K. The solution (x,y,z) will be stored in registers X, Y, and Z; and will be returned to the stack (in locations X, Y, and Z).

Listing

C01	LBL C
C02	STO T
C03	1
C04	+
C05	5
C06	XEQ S
C07	RCL T
C08	7
C09	+
C10	11
C11	XEQ S
C12	RCL T
C13	12
C14	+
C15	16
C16	XEQ S
C17	RTN

K01	LBL K
K02	XEQ D
K03	1/x
K04	STO G
K05	1
K06	XEQ C
K07	XEQ D
K08	RCL G
K09	~ (MULTIPLICATION)
K10	STO X
K11	1
K12	XEQ C
K13	2
K14	XEQ C
K15	XEQ D
K16	RCL G
K17	~ (MULTIPLICATION)
K18	STO Y
K19	2
K20	XEQ C
K21	3
K22	XEQ C
K23	XEQ D
K24	RCL G
K25	~ (MULTIPLICATION)
K26	STO Z
K27	3
K28	XEQ C
K29	RCL Z
K30	RCL Y
K31	RCL X
K32	RTN

S01	LBL S
S02	STO R
S03	R« (ROLL DOWN)
S04	STO S
S05	STO i
S06	RCL(i)
S07	RCL R
S08	STO i
S09	R« (ROLL DOWN)
S10	x<>(i)
S11	RCL S
S12	STO i
S13	R« (ROLL DOWN)
S14	STO(i)
S15	RTN

D01	LBL D
D02	RCL I
D03	RCL O
D04	~ (MULTIPLICATION)
D05	RCL J
D06	RCL N
D07	~ (MULTIPLICATION)
D08	-
D09	RCL B
D10	~ (MULTIPLICATION)
D11	RCL H
D12	RCL O
D13	~ (MULTIPLICATION)
D14	RCL J
D15	RCL M
D16	~ (MULTIPLICATION)
D17	-
D18	RCL C
D19	~ (MULTIPLICATION)
D20	-
D21	RCL H
D22	RCL N
D23	~ (MULTIPLICATION)
D24	RCL I
D25	RCL M
D26	~ (MULTIPLICATION)
D27	-
D28	RCL D
D29	~ (MULTIPLICATION)
D30	+
D31	STO A
D32	RTN

Go back to the software library
Go back to the main exhibit hall