Generalized Horn Functions of Three Variables for the HP-41
Overview
1°) GA ( a , b , b' , c
; x , y , z )
2°) GB ( a , b , b' , b"
, c ; x , y , z )
3°) GC ( a , a' , b , b'
, c ; x , y , z )
4°) GD ( a , a' , b , b'
, b" , c ; x , y , z )
-These functions are defined through hypergeometric series of 3 variables.
-They are convergent if max { | x | , | y | , | z | } < 1
-Pochhammer's symbol is defined by: (a)m = Gam (a+m)
/ Gam (a) where Gam = Euler's Gamma function.
-I've used an M-Code routine X+1 to add one to X-register.
It may be replaced by ISG X CLX
1°) GA ( a , b , b' , c ; x , y ,
z )
Formula: GA ( a , b , b' , c ; x , y , z ) = SUMm,n,p=0 to infinity um,n,p xm yn zp / ( m! n! p! )
with um,n,p = (a)n+p-m
(b)m+p (b')n / (c)n+p-m
Data Registers: R00-R05-R13: temp ( Registers R01 thru R04 are to be initialized before executing "GA" )
• R01 = a • R02 = b
• R04 = c R07
= x R10 = m
R06 is unused
• R03 = b'
R08 = y R11 = n
R09 = z R12 = p
Flags: /
Subroutines: /
01 LBL "GA"
02 STO 07 03 RDN 04 STO 08 05 X<>Y 06 STO 09 07 CLX 08 STO 10 09 STO 11 10 STO 12 11 SIGN 12 STO 00 13 STO 13 14 SIGN 15 LBL 01 16 LASTX 17 RCL 02 18 RCL 10 19 + 20 RCL 12 |
21 +
22 * 23 RCL 11 24 RCL 12 25 + 26 RCL 10 27 X+1 28 STO 10 29 ST/ Z 30 - 31 STO 05 32 RCL 04 33 + 34 * 35 RCL 01 36 RCL 05 37 + 38 / 39 RCL 07 40 * |
41 +
42 X#Y? 43 GTO 01 44 CLX 45 STO 10 46 X<> 00 47 RCL 11 48 RCL 12 49 + 50 STO 05 51 RCL 01 52 + 53 * 54 RCL 04 55 RCL 05 56 + 57 / 58 RCL 03 59 RCL 11 60 ST+ Y |
61 X+1
62 STO 11 63 / 64 * 65 RCL 08 66 * 67 STO 00 68 + 69 X#Y? 70 GTO 01 71 CLX 72 STO 11 73 X<> 13 74 RCL 01 75 RCL 12 76 + 77 * 78 RCL 02 79 RCL 12 80 + |
81 *
82 RCL 04 83 RCL 12 84 ST+ Y 85 X+1 86 STO 12 87 * 88 / 89 RCL 09 90 * 91 STO 00 92 STO 13 93 + 94 X#Y? 95 GTO 01 96 END |
( 114 bytes / SIZE 014 )
STACK | INPUTS | OUTPUTS |
Z | z | GA(x,y,z) |
Y | y | GA(x,y,z) |
X | x | GA(x,y,z) |
Example:
a = sqrt(2) b = sqrt(3) b' = sqrt(5)
c = sqrt(6)
which are to be stored into R01 thru R04
0.12 ENTER^
0.11 ENTER^
0.10 XEQ "GA" >>>>
GA( 0.10 , 0.11 , 0.12 ) = 2.051173839
---Execution time = 7mn00s---
2°) GB ( a , b , b' , b" , c ; x
, y , z )
Formula: GB ( a , b , b' , b", c ; x , y , z ) = SUMm,n,p=0 to infinity um,n,p xm yn zp / ( m! n! p! )
with um,n,p = (a)n+p-m
(b)m (b')n (b")p / (c)n+p-m
Data Registers: R00-R06-R13: temp ( Registers R01 thru R05 are to be initialized before executing "GB" )
• R01 = a • R02 = b
• R05 = c R07
= x R10 = m
• R03 = b'
R08 = y R11 = n
• R04 = b"
R09 = z R12 = p
Flags: /
Subroutines: /
01 LBL "GB"
02 STO 07 03 RDN 04 STO 08 05 X<>Y 06 STO 09 07 CLX 08 STO 10 09 STO 11 10 STO 12 11 SIGN 12 STO 00 13 STO 13 14 SIGN 15 LBL 01 16 LASTX 17 RCL 02 18 RCL 10 19 + |
20 *
21 RCL 11 22 RCL 12 23 + 24 RCL 10 25 X+1 26 STO 10 27 ST/ Z 28 - 29 STO 06 30 RCL 05 31 + 32 * 33 RCL 01 34 RCL 06 35 + 36 / 37 RCL 07 38 * |
39 +
40 X#Y? 41 GTO 01 42 CLX 43 STO 10 44 X<> 00 45 RCL 11 46 RCL 12 47 + 48 STO 06 49 RCL 01 50 + 51 * 52 RCL 05 53 RCL 06 54 + 55 / 56 RCL 03 57 RCL 11 |
58 ST+ Y
59 X+1 60 STO 11 61 / 62 * 63 RCL 08 64 * 65 STO 00 66 + 67 X#Y? 68 GTO 01 69 CLX 70 STO 11 71 X<> 13 72 RCL 01 73 RCL 12 74 + 75 * 76 RCL 04 |
77 RCL 12
78 + 79 * 80 RCL 05 81 RCL 12 82 ST+ Y 83 X+1 84 STO 12 85 * 86 / 87 RCL 09 88 * 89 STO 00 90 STO 13 91 + 92 X#Y? 93 GTO 01 94 END |
( 112 bytes / SIZE 014 )
STACK | INPUTS | OUTPUTS |
Z | z | GB(x,y,z) |
Y | y | GB(x,y,z) |
X | x | GB(x,y,z) |
Example:
a = sqrt(2) b = sqrt(3) b' = sqrt(5)
b" = sqrt(6) c = sqrt(7)
which are to be stored into R01 thru R05
0.12 ENTER^
0.11 ENTER^
0.10 XEQ "GB" >>>>
GB( 0.10 , 0.11 , 0.12 ) = 2.110638277
---Execution time = 5mn37s---
3°) GC ( a , a' , b , b' , c ; x
, y , z )
Formula: GC ( a , a' , b , b' , c ; x , y , z ) = SUMm,n,p=0 to infinity um,n,p xm yn zp / ( m! n! p! )
with um,n,p = (a)p-m
(a')n (b)m+p (b')n / (c)n+p-m
Data Registers: R00-R06-R13: temp ( Registers R01 thru R05 are to be initialized before executing "GC" )
• R01 = a • R03 = b
• R05 = c R07
= x R10 = m
• R02 = a' • R04 = b'
R08 = y R11 = n
R09 = z R12 = p
Flags: /
Subroutines: /
01 LBL "GC"
02 STO 07 03 RDN 04 STO 08 05 X<>Y 06 STO 09 07 CLX 08 STO 10 09 STO 11 10 STO 12 11 SIGN 12 STO 00 13 STO 13 14 SIGN 15 LBL 01 16 LASTX 17 RCL 03 18 RCL 10 19 + |
20 RCL 12
21 + 22 * 23 RCL 12 24 RCL 10 25 X+1 26 STO 10 27 ST/ Z 28 - 29 STO 06 30 RCL 11 31 + 32 RCL 05 33 + 34 * 35 RCL 01 36 RCL 06 37 + 38 / |
39 RCL 07
40 * 41 + 42 X#Y? 43 GTO 01 44 CLX 45 STO 10 46 X<> 00 47 RCL 02 48 RCL 11 49 + 50 * 51 RCL 04 52 RCL 11 53 + 54 * 55 RCL 05 56 RCL 12 57 + |
58 RCL 11
59 ST+ Y 60 X+1 61 STO 11 62 * 63 / 64 RCL 08 65 * 66 STO 00 67 + 68 X#Y? 69 GTO 01 70 CLX 71 STO 11 72 X<> 13 73 RCL 01 74 RCL 12 75 + 76 * |
77 RCL 03
78 RCL 12 79 + 80 * 81 RCL 05 82 RCL 12 83 ST+ Y 84 X+1 85 STO 12 86 * 87 / 88 RCL 09 89 * 90 STO 00 91 STO 13 92 + 93 X#Y? 94 GTO 01 95 END |
( 113 bytes / SIZE 014 )
STACK | INPUTS | OUTPUTS |
Z | z | GC(x,y,z) |
Y | y | GC(x,y,z) |
X | x | GC(x,y,z) |
Example:
a = sqrt(2) a' = sqrt(3)
b = sqrt(5) b' = sqrt(6) c = sqrt(7)
which are to be stored into R01 thru R05
0.12 ENTER^
0.11 ENTER^
0.10 XEQ "GC" >>>>
GC( 0.10 , 0.11 , 0.12 ) = 2.486383200
---Execution time = 8mn00s---
4°) GD ( a , a' , b , b' , b" , c
; x , y , z )
Formula: GD ( a , a' , b , b' , b", c ; x , y , z ) = SUMm,n,p=0 to infinity um,n,p xm yn zp / ( m! n! p! )
with um,n,p = (a)p-m
(a')n (b)m (b')n (b")p
/ (c)n+p-m
Data Registers: R00-R13-R14: temp ( Registers R01 thru R06 are to be initialized before executing "GD" )
• R01 = a • R03 = b
• R06 = c R07
= x R10 = m
• R02 = a' • R04 = b'
R08 = y R11 = n
• R05 = b"
R09 = z R12 = p
Flags: /
Subroutines: /
01 LBL "GD"
02 STO 07 03 RDN 04 STO 08 05 X<>Y 06 STO 09 07 CLX 08 STO 10 09 STO 11 10 STO 12 11 SIGN 12 STO 00 13 STO 13 14 SIGN 15 LBL 01 16 LASTX 17 RCL 03 18 RCL 10 19 + |
20 *
21 RCL 12 22 RCL 10 23 X+1 24 STO 10 25 ST/ Z 26 - 27 STO 14 28 RCL 11 29 + 30 RCL 06 31 + 32 * 33 RCL 01 34 RCL 14 35 + 36 / 37 RCL 07 38 * |
39 +
40 X#Y? 41 GTO 01 42 CLX 43 STO 10 44 X<> 00 45 RCL 02 46 RCL 11 47 + 48 * 49 RCL 04 50 RCL 11 51 + 52 * 53 RCL 06 54 RCL 12 55 + 56 RCL 11 57 ST+ Y |
58 X+1
59 STO 11 60 * 61 / 62 RCL 08 63 * 64 STO 00 65 + 66 X#Y? 67 GTO 01 68 CLX 69 STO 11 70 X<> 13 71 RCL 01 72 RCL 12 73 + 74 * 75 RCL 05 76 RCL 12 |
77 +
78 * 79 RCL 06 80 RCL 12 81 ST+ Y 82 X+1 83 STO 12 84 * 85 / 86 RCL 09 87 * 88 STO 00 89 STO 13 90 + 91 X#Y? 92 GTO 01 93 END |
( 111 bytes / SIZE 015 )
STACK | INPUTS | OUTPUTS |
Z | z | GD(x,y,z) |
Y | y | GD(x,y,z) |
X | x | GD(x,y,z) |
Example:
a = sqrt(2) a' = sqrt(3) b = sqrt(5)
b' = sqrt(6) b" = sqrt(7) c = sqrt(8)
which are to be stored into R01 thru R06
0.12 ENTER^
0.11 ENTER^
0.10 XEQ "GD" >>>>
GD( 0.10 , 0.11 , 0.12 ) = 2.456201033
---Execution time = 6mn14s---
Reference:
[1] Shrivastava & Singh - "Some New Generating Relations
for Generalized Horn Functions"