HP Forums

Full Version: Sixth Order Linear Equation Solver for the hp 33s
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

As part of a continuing effort to explore the capabilities of the hp 33s I have translated a sixth order linear equation solver for use on that machine. The documentation is much too long for a Forum topic so it has been entered as Article 676.

I believe that by judicious use of the statistics registers I should be able to fit a seventh order solver on the hp 33s but I haven't been able to push it through yet. I'm still working on it.

I'm very enthusiastic to give the program a try!

A lack of super-3x3 matrix support is the primary reason that my 33s has been in probation for the last 8 months.


It turns out that it was not very difficult to expand the program to solve a seventh order set of linear equations. The changes required are:

1. Insert a CLSum command immediately after the CLVARS near the beginning of the program.

2. Add the following subroutine at the end of the program:

T0001 LBL T

T0002 STO i

T0003 x<>y

T0004 25

T0005 x>y?

T0006 RTN

T0007 3

T0008 STO+ i

T0009 RTN

3. Replace the STO i command with a XEQ T command at the following program locations:













The operating instructions are not changed.

For the test problem with a seventh order sub-Hilbert as the matrix A and all ones as the vector B the results are

    Exact                hp 33s                Relative Error

56 56.068858872 1.229E-03
-1512 -1513.60579469 1.062E-03
12600 12611.7867396 0.935E-03
-46200 -46238.6331388 0.836E-03
83160 83222.8860386 0.756E-03
-72072 -72121.7495754 0.690E-03
24024 24039.2548347 0.634E-03

for a mean relative error of 0.878E-03. For the same problem the HP-41 MathPac yields a mean relative error of 0.837E-02 and the ML-02 program for the TI-59 yields a mean relative error of 1.033E-04. In a subsequent submission I will provide comparisons with other machines and with other problems.

That's really impressive! Now, a fourth or even a third order Complex Linear Equation Solver would be great, but that would be asking too much, I recognize :-)

One of the things that impressed me in my first decent programmable calculator, a TI-59 back in 1982, was its matrix abilities (ML-02 and ML-03). It would invert a 9x9 matrix in about 12 minutes!

Thanks for your continued efforts in writing and porting excellent software to the HP-33S.

Best regards,

Gerson W. Barbosa.

Edited: 17 Sept 2006, 7:39 p.m.

The original sixth order program in Article 676 would run equally well in either RPN mode or ALG mode. My modification above of the program to provide a seventh order capability will run properly in ALG mode but will not run properly for all N when in RPN mode. To run properly in RPN mode the T subroutine must be modified by removing the x<>Y commsnd at T0003. The T subroutine for use in RPN mode then becomes:

T0001 LBL T

T0002 STO i

T0003 25

T0004 x>y?

T0005 RTN

T0006 3

T0007 STO+ i

T0008 RTN