Page 1 of 1

[41C] Linear Equations Solver for three Unknown

Posted: Sat Jun 29, 2019 11:10 pm
by Dani R.
What it is? It is a linear equations solver.
What does it do? It solves a system of three linear equations containing the same set of variables.

At startup the program "a=?" is queried, i.e. you have to enter a11.
R/S, "b=?" is prompted, you must enter a12.
R/S, "c=?" is prompted, you must enter a13.
R/S, "res=?" is prompted, you must enter b1.
R/S → a21 for "a=?", R/S → a22 for "b=?", R/S → a23 for "c=?", R/S → b2 for "res=?".
R/S → a31 for "a=?", R/S → a32 for "b=?", R/S → a33 for "c=?", R/S → b3 for "res=?".
As you can see, improvements are possible for the input of variables, to be more precise.
R/S, you get "X=...." representing x1.
R/S, you get "Y=...." representing x2.
R/S, you get "Z=...." representing x3.

There is no use for this program if you have a calculator with matrix. But the DM41(L) has no MathPac installed.
(1982/1983, 2019)
Possibly this was general knowledge.

Listing:

Code: Select all

LBL "GLG 3 U"
1.012
STO 00
LBL 00
"a=?"
PROMPT
STO IND 00
ISG 00
"b=?"
PROMPT
STO IND 00
ISG 00
"c=?"
PROMPT
STO IND 00
ISG 00
"RES=?"
PROMPT
STO IND 00
ISG 00
GTO 00
RCL 01
ST/ 02
ST/ 03
ST/ 04
RCL 02
RCL 05
*
ST- 06
RCL 03
RCL 05
*
ST- 07
RCL 04
RCL 05
*
ST- 08
RCL 02
RCL 09
*
ST- 10
RCL 03
RCL 09
*
ST- 11
RCL 04
RCL 09
*
ST- 12
RCL 06
ST/ 07
ST/ 08
RCL 07
RCL 10
*
ST- 11
RCL 08
RCL 10
*
ST- 12
RCL 11
ST/ 12
RCL 07
RCL 12
*
ST- 08
RCL 02
RCL 08
*
ST- 04
RCL 03
RCL 12
*
ST- 04
SF 21
"X="
ARCL 04
AVIEW
"Y="
ARCL 08
AVIEW
"Z="
ARCL 12
AVIEW
END