Post Reply 
Updated 'Solve & Integrate" Module w/ Recursion Support
02-07-2017, 11:25 AM (This post was last modified: 02-10-2017 06:00 AM by Ángel Martin.)
Post: #1
Updated 'Solve & Integrate" Module w/ Recursion Support
Updated version of the SIROM Module is available.

Short on the heels of a nested implementation of FINTG for double integrals, it is now also possible to use FROOT in a recursive scheme to resolve systems of 2 equations (linear or not).

The module includes the original SOLVE and INTEG (renamed as FROOT and FINTG), plus several other FOCAL routines for root-finding and integral calculations. Three housekeeping MCODE functions are included to manage the nested configurations: RESET, CLOAK, and EXPOSE - all completely transparent to the user, refer to the examples provided in the ROM for utilization details.

FOCAL programs for double integrals and systems of 2 equations are also thrown in so you can compare the methodologies.

Several application examples are included, like Sine & Cosine Integrals, Error Function, Inverse Normal Probability, Fourier Coefficients, Bessel J(n,x), Integral of Bessel J(n,x), and Zeros of Bessel J(n,x) for integer orders.

Here's the QRG for the ROM contents - 41 FAT entries in total:

Code:
#     Name         Description             Instructions
----------------------------------------------------------------------------
00    -SOLINTG 2D  Section Header          n/a
01    FINTG        HP's INTEG              Fnc in Alpha, a^b in Stack
02    FROOT        HP's SOLVE              Fnc in Alpha, a^b in Stack
03    SILOOP       Solve/Integ Loop        n/a
04    "SIRTN"      Solve/Integ RTN         n/a
05    "2DITG"      2D  Integration         Step in R10, limits in stack
06    "FITG2"      Recursive FINTG         "FName", in Alpha, limits in stack
07    "*2D"        Auxiliary for FITG2     n/a
08    "FRT2"       Recursive FROOT         "F1,F2" in Alpha, limits in stack
09    "*FG"        Auxiliary for FRT2       n/a
10    "SYS2"       Non-linear 2-eq system  Prompts for data
11    "SLV"        PPC's Solve             FNC in ALPHA, a^b in stack
12    ASWAP        Alpha Swap around comma "A,B" in Alpha
13    CLAC         CLA from comma          "A,B" in Alpha
14    CLOAK        Nest SIROM buffer       within nested loop
15    EXPOSE       Undo Nested Buffer      within nested loop
16    RESET        Prepare Nested Buffers  in main loop
17    -APPLIED     Free registers finder   returns # available regs
18    "2DF1"       Example 1 for 2DITG     x in R01, y in X
19    "2DF2"       Example 2 for 2DITG     x in R01, y in X
20    "2DF3"       Example 3 for 2DITG     x in R01, y in X
21    "F1XY"       Example 1  for FINTG2   x in X, y in R01
22    "F2XY"       Example 2 for FINTG2    x in X, y in R01
23    "F1"         Example 1-1 for FRT2    x in R01, y in R02
24    "F2"         Example 1-2 for FRT2    x in R01, y in X
25    "FF"         Example 2-1 for FRT2    x in R01, y in R02
26    "GG"         Example 2-2 for FRT2    x in R01, y in X
27    "CI"         Cosine Integral         argument in X
28    "ERF"        Error Function          argument in X
29    "FOURN"      Fourier Coefficients    Prompts for data
30    "ITJB        Integral of J Bessel    n in Y, x in X
31    "JYX"        Bessel J (int. order)   n^x in stack, F00 clear(!)
32    "Q-1"        Inverse Probability     P(x) in X
33    "SI "        Sine Integral           argument in X
34    "ZJYX"       Zeros of Bessel J       Prompts for order
35    "*C"         Integrand Fnc.          n/a
36    "*E"         Integrand Fnc.          n/a
37    "*FN"        Integrand Fnc.          n/n
38    "*JN"        Integrand Fnc.          n/a
39    "*Q"         Integrand Fnc.          n/a
40    "*S"         Integrand Fnc.          n/a

The routines are not fast, their interest is in the methodology - not optimized for speed to say the least. If you need faster response then the SandMath provides dedicated MCODE for many of these and yet some more.

Using the 41-CL or turbo mode on emulators is highly recommended.

A manual will follow - early adopters can get started with the MOD file attached.

PS. The recursive root finding in "FRT2" requires the Library#4 module also plugged in.


Attached File(s)
.zip  SIROM.zip (Size: 4.78 KB / Downloads: 17)
Find all posts by this user
Quote this message in a reply
Post Reply 




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