Post Reply 
HP-41: Formula Evaluation ROM
06-11-2017, 09:16 AM (This post was last modified: 06-12-2017 11:17 AM by Ángel Martin.)
Post: #16
RE: HP-41: Formula Evaluation ROM
(06-10-2017 08:34 PM)JurgenRo Wrote:  Awesome! Simply awesome! Thanks a lot for the new gem!!
Alte the Best,
Juergen

Glad to see it's appreciated, a lot of work went into it!

BTW I recently added more examples in the ROM, for the most common Orthogonal polynomials. The routines won't beat the speed of the MCODE-based functions in the SandMath and SandMatrix, but show how to use EVAL$ in a DSE-controlled loop.

Here's the code, including Legendre LEG$, Hermite HMT$, and Chebyshev's 1st. & 2nd. kinds HNX$, UNX$ - all four in 50 steps, not bad at all.
Enter the order "n" in Y and the argument "x" in X, then execute the routine. The result is left in X, and the previous order result in LastX.
No data registers used.

Code:
1    LBL "LEG$
2    4
3    "((2*T-1)*Z*X-L"
4    "|- (T-1))/T"   - first char is append
5    GTO 00
6    LBL "HMT$
7    3
8    GTO 00
9    LBL "TNX$
10    0
11    GTO 00
12    LBL "UNX$
13    E
14    LBL 00
15    X<>F
16    RDN
17    X<>Y
18    X=0?
19    GTO 00
20    E
21    X=Y?
22    GTO 01
23    STO T
24    FS? 02
25    ST+ T
26    -
27    X<>Y
28    STO Z
29    FS? 00
30    ST+ X
31    FS? 02
32    GTO 02
33    "2*Z*X-L"
34    FS? 01
35    "|- *2*T"  -  first char is append
36    LBL 02
37    EVAL$
38    ISG T
39    NOP
40    DSE Y
41    GTO 02
42    RTN
43    LBL 00
44    E
45    RTN
46    LBL 01
47    X<>Y
48    FS? 00
49    ST+ X
50    END

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP-41: Formula Evaluation ROM - Namir - 06-06-2017, 05:38 PM
RE: HP-41: Formula Evaluation ROM - pier4r - 06-06-2017, 10:05 PM
RE: HP-41: Formula Evaluation ROM - Gene - 06-06-2017, 06:12 PM
RE: HP-41: Formula Evaluation ROM - Gene - 06-07-2017, 02:33 AM
RE: HP-41: Formula Evaluation ROM - Ángel Martin - 06-11-2017 09:16 AM
RE: HP-41: Formula Evaluation ROM - Gene - 06-11-2017, 03:47 PM



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