Post Reply 
HP15c CE: 8x8 equation system
05-12-2023, 07:17 AM
Post: #2
RE: HP15c CE: 8x8 equation system
I did something similar some time ago as a simple test case for using multiple matrices beyond 64 registers and solving 8x8 systems on extended 15C platforms (but not the CE of course).
I built the test in such a way that the result can be verified.

Here are the details:

- Ensure your platform has 74 or more free ("uncommitted") registers.

- create and fill a 8x8 matrix A:
    8  ENTER  DIM A
    MATRIX 1
    PI  STO RAN#
    Set USER ON
    enter and run this program:
    001-42,21,11  LBL A
    002-    42 36  RAN#
    003-          1
    004-          0
    005-         20  *
    006-     43 44  INT
    007u     44 11  STO A
    008-     22 11  GTO A

    After the program terminates, the stack must be x=7, y=7, z=4, t=4.
    Check that the first elements A are correct:
    (USER is ON)
    MATRIX 1
    RCL A --> A(1,1)=8
    RCL A --> A(1,2)=2
    RCL A --> A(1,2)=0
    ...
    then check A globally by calculating the norm (matrix 8):
    RCL MATRIX A
    MATRIX 8
    --> 43.6921
- create and fill a 8x1 vector b
    8  ENTER  1  DIM b
    (USER is ON)
    MATRIX 1
    132  STO b
    157  STO b
    196  STO b
    149  STO b
    231  STO b
    239  STO b
    180  STO b
    151  STO b

    check that b is correct by calculating the norm (matrix 8):
    RCL MATRIX b
    MATRIX 8
    --> 518.0473
- Now solve A.X=b, result in b:
    RESULT b
    RCL MATRIX b
    RCL MATRIX A
    /
- Check the solution is [ 1 2 3 4 5 6 7 8 ]
    MATRIX 1
    (USER is ON)
    RCL b  --> b(1,1)=1
    RCL b  --> b(2,1)=2
    RCL b  --> b(3,1)=3
    ...
    RCL b  --> b(8,1)=8
- Successfully tested on:
    DM15L w/ 228 registers,
    15C LE w/ 192 registers,
    PX15C w/ 160 registers,
    all with a standard partition 19 DIM (i)

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP15c CE: 8x8 equation system - Divasson - 05-12-2023, 06:56 AM
RE: HP15c CE: 8x8 equation system - J-F Garnier - 05-12-2023 07:17 AM
RE: HP15c CE: 8x8 equation system - johanw - 05-12-2023, 11:50 PM
RE: HP15c CE: 8x8 equation system - johanw - 05-13-2023, 11:38 AM



User(s) browsing this thread: 5 Guest(s)