Bionic Special Functions(IV) for the HP-41
"Fractional-Integro-Differentiation"Overview
0°) 5 Extra-Registers & M-Code
Routines
1°) A few Elementary Functions
2°) Error Function
3°) Sine & Hyperbolic Sine Integral
4°) Cosine & Hyperbolic Cosine
Integral
5°) Exponential Integral Ei
6°) Bessel & Modified Bessel Functions
of the 1st Kind
7°) Bessel & Modified Bessel Functions
of the 2nd Kind - Non-Integer Order
8°) Spherical Bessel Functions of
the 1st Kind
9°) Hermite Functions
10°) Fresnel Integrals
11°) Airy Functions
-The fractional-integro-differentiation of a complex or a bicomplex
function is quite well defined.
-For biquaternions, bioctonions and so on, this is more doubtful:
-Even the 1st derivative of b2 is not 2.b
because the multiplication is not commutative in general.
-So, these functions may be regarded as other special functions not
always related to differentiation of special functions... except for bicomplex
arguments !
0°) 5 Extra Registers & M-Code Routines
-Like the other bionic functions, 5 extra-registers are used:
R S U V W
-STO W & RCL W are listed in "A few M-Code Routines
for the HP-41"
-Registers R S U and V are coded in the same way.
-Of course, if n is not too large, you can replace these registers by R95 R96 R97 R98 R99
-Other M-Code routines are employed:
Z^2 Z*Z 1/Z Z/Z ..... cf "A few M-Code Routines for the HP-41"
and X+1 X-1 X/E3 X/2 X/3 SINH COSH -------------------------------------------
-And M-Code routines that are useful for anions are also be used for bi-ons without any modification:
A+A A-A ST*A ST/A AMOVE ASWAP
DSA DS*A cf "Anions" and "Anionic Functions for
the HP-41"
1°) A few Elementary Functions
Formulae:
• Complex Power Dµ bz = [ z ! / Gam(z-µ+1) ] bz-µ assuming z # -1 , -2 , -3 , .....
• Hyperbolic Sine Dµ Sinh b = 2µ-1 sqrt(PI) b1-µ1F~2 ( 1 ; (2-µ)/2 , (3-µ)/2 ; b2/4 )
• Hyperbolic Cosine Dµ Cosh b = (2/b)µ sqrt(PI) 1F~2 ( 1 ; (1-µ)/2 , (2-µ)/2 ; b2/4 )
• Sine Dµ Sin b = 2µ-1 sqrt(PI) b1-µ1F~2 ( 1 ; (2-µ)/2 , (3-µ)/2 ; -b2/4 )
• Cosine Dµ Cos b = (2/b)µ sqrt(PI) 1F~2 ( 1 ; (1-µ)/2 , (2-µ)/2 ; -b2/4 )
• Logarithm Dµ Ln b = b -µ FC(µ)log (b)
where
FC(µ)log (b) = (-1)µ-1 (µ-1)
!
if µ is a positive integer
and
FC(µ)log (b) = [ Ln b - Psi(1-µ) - gamma
] / Gam(1-µ) otherwise
Psi = Digamma Function , gamma = Euler's constant = 0.5772156649... and Gam = Gamma Function.
• Exponential
Dµ Exp b = b -µ 1F~1
( 1 ; 1-µ ; b )
Data Registers: • R00 = 2n > 3 ( Registers R00 thru R2n are to be initialized before executing these routines )
• R01 ...... • R2n = the n components of the bion
R2n+1 ........ R6n: temp ( sometimes )
>>> When the programs stop: R01
...... R2n = the n components of the result
Flags: F01 & F02
Subroutines: B*B1 Z*B "B^Z"
"B^X" "LNB" ST*A ST/A DSA Z*Z Z/Z
Z+Z Z-Z AMOVE ASWAP X+1 X-1 X/E3
X/2
STO R RCL R STO S RCL S STO U RCL U
STO V RCL V STO W RCL W
"GAMZ" ( cf "Gamma Function for the HP-41" paragraph
1°) h-3) )
"PSIZ" ( cf "Gamma Function for the HP-41" paragraph
2°) b-2) )
-Lines 28-129 are three-byte GTO's
-Line 199 GEU is Euler's constant and may be replaced by
0.5772156649
01 LBL "DB^Z"
02 STO R 03 RDN 04 STO S 05 RDN 06 STO U 07 ST- Z 08 RDN 09 STO V 10 ST- Z 11 RDN 12 XEQ "B^Z" 13 RCL S 14 RCL R 15 X+1 16 XEQ "GAMZ" 17 Z*B 18 RCL S 19 RCL V 20 - 21 RCL R 22 RCL U 23 - 24 X+1 25 XEQ "GAMZ" 26 1/Z 27 Z*B 28 GTO 10 29 LBL "DSHB" 30 SF 01 31 CF 02 32 GTO 00 33 LBL "DCHB" 34 CF 01 35 CF 02 36 GTO 00 37 LBL "DSINB" 38 SF 01 |
39 SF 02
40 GTO 00 41 LBL "DCOSB" 42 CF 01 43 SF 02 44 LBL 00 45 CHS 46 STO U 47 X<>Y 48 CHS 49 STO V 50 12 51 AMOVE 52 B*B1 53 4 54 FS? 02 55 CHS 56 ST/A 57 12 58 ASWAP 59 RCL V 60 RCL U 61 FS? 01 62 X+1 63 XEQ "B^Z" 64 RCL V 65 X/2 66 RCL U 67 X/2 68 X+1 69 XEQ "GAMZ" 70 1/Z 71 Z*B 72 RCL V 73 X/2 74 3 75 FC? 01 76 SIGN |
77 RCL U
78 + 79 X/2 80 XEQ "GAMZ" 81 1/Z 82 Z*B 83 RCL V 84 CHS 85 2 86 LN 87 * 88 2 89 RCL U 90 CHS 91 FS? 01 92 X-1 93 Y^X 94 RAD 95 P-R 96 PI 97 SQRT 98 ST* Z 99 * 100 Z*B 101 DEG 102 13 103 AMOVE 104 CLX 105 STO W 106 LBL 01 107 B*B1 108 RCL V 109 X/2 110 RCL U 111 X/2 112 RCL W 113 X+1 114 STO W |
115 +
116 RCL X 117 .5 118 FC? 01 119 CHS 120 + 121 R^ 122 X<>Y 123 Z*Z 124 1/Z 125 Z*B 126 DSA 127 X#0? 128 GTO 01 129 GTO 09 130 LBL "DE^B" 131 CHS 132 STO U 133 X<>Y 134 CHS 135 STO V 136 12 137 AMOVE 138 X<> Z 139 XEQ "B^Z" 140 RCL V 141 RCL U 142 X+1 143 XEQ "GAMZ" 144 1/Z 145 Z*B 146 13 147 AMOVE 148 CLX 149 STO W 150 LBL 02 151 B*B1 152 RCL V |
153 RCL U
154 RCL W 155 X+1 156 STO W 157 + 158 1/Z 159 Z*B 160 DSA 161 X#0? 162 GTO 02 163 GTO 09 164 LBL "DLNB" 165 STO U 166 X<>Y 167 STO V 168 X#0? 169 GTO 00 170 X<>Y 171 FRC 172 X#0? 173 GTO 00 174 LASTX 175 X<=0? 176 GTO 00 177 CHS 178 XEQ "B^X" 179 RCL U 180 X-1 181 FACT 182 1 183 CHS 184 LASTX 185 Y^X 186 * 187 ST*A 188 GTO 10 189 LBL 00 190 12 |
191 AMOVE
192 XEQ "LNB" 193 RCL V 194 CHS 195 1 196 RCL U 197 - 198 XEQ "PSIZ" 199 GEU 200 + 201 ST- 01 202 X<>Y 203 ST- 02 204 RCL V 205 CHS 206 1 207 RCL U 208 - 209 XEQ "GAMZ" 210 1/Z 211 Z*B 212 12 213 ASWAP 214 RCL V 215 CHS 216 RCL U 217 CHS 218 XEQ "B^Z" 219 B*B1 220 GTO 10 221 LBL 09 222 31 223 AMOVE 224 LBL 10 225 RCL 00 226 X/E3 227 ISG X 228 END |
( 478 bytes / SIZE 2n+1 or 4n+1 or 6n+1
)
STACK | INPUT | OUTPUT | INPUT | OUTPUT |
T | Im µ | / | / | / |
Z | Ré µ | / | / | / |
Y | Im z | / | Im µ | / |
X | Ré z | 1.2n | Ré µ | 1.2n |
Where 1.2n is the control number of the result f(b) ; z is required for "DB^Z" only
Examples: µ = - 3.14 + 2.718
b = ( 0.1 + 0.2 i ) + ( 0.3 + 0.4 i ) e1 + ( 0.5 + 0.6 i ) e2 + ( 0.7 + 0.8 i ) e3 ( biquaternion -> 2n = 8 STO 00 )
0.1 STO 01
0.2 STO 02 0.3 STO 03
0.4 STO 04 0.5 STO 05
0.6 STO 06 0.7 STO 07
0.8 STO 08
• "DB^Z" if
z = 1.4 + 1.6 i f(b) = ( 0.497693397
+ 0.217073385 i ) + ( 0.084362474 - 0.160789880 i ) e1
+ ( 0.118742269 - 0.257581210 i ) e2 + ( 0.153122064 - 0.354372541
i ) e3 ---Execution time = 36s---
• "DSHB" f(b) =
( 94.46345412 + 13.00295558 i ) + ( 6.540750160 - 33.16801881 i ) e1
+ ( 7.550128740 - 52.26536935 i ) e2 + ( 8.559507320 - 71.36271989
i ) e3 ---Execution
time = 73s---
• "DCHB" f(b) =
( -300.5212807 - 126.9640068 i ) + ( -51.26069325 + 103.7952204 i ) e1
+ ( -71.66306380 + 166.0213993 i ) e2 + ( -92.06543438 + 228.2475783
i ) e3 ---Execution time = 72s---
• "DSINB" f(b) = (
86.10292770 + 18.96360932 i ) + ( 8.479611398 - 30.08538253 i ) e1
+ ( 10.82136317 - 47.61156567 i ) e2 + ( 13.16311495 - 65.13774877
i ) e3 ---Execution
time = 72s---
• "DCOSB" f(b) = ( -254.7188991
- 135.6609116 i ) + ( -53.38061175 + 87.39494609 i ) e1
+ ( -76.28215864 + 140.6065648 i ) e2 + ( -99.18370552 + 193.8181835
i ) e3 ---Execution time = 72s---
• "DE^B" f(b)
= ( -206.0578270 - 113.9610520 i ) + ( -44.71994334 + 70.62720169
i ) e1
+ ( -64.11293543 + 113.7560302 i ) e2 + ( -83.50592750 + 156.8848587
i ) e3 ---Execution time = 77s---
• "DLNB" f(b) = ( 859.0935902
- 587.9181227 i ) + ( -190.2120844 - 316.4051620 i ) e1
+ ( -322.0432648 - 478.3750859 i ) e2 + ( -453.8744452 - 640.3450101
i ) e3 ---Execution
time = 45s---
with µ = 3 f(b)
= ( 0.233801702 + 0.211686542 i ) + ( -0.191588820 - 0.110389216 i ) e1
+ ( -0.307709696 - 0.156880071 i ) e2 + ( -0.423830573 - 0.203370926
i ) e3 ---Execution
time = 18s---
Notes:
"DB^Z" does not work for z = -1 , -2 , -3 , ......
"DCHB" "DCOSB" "DE^B" don't work if µ
= 1 , 2 , 3 , ...
"DSHB" "DSINB"
don't work if µ = 2 , 3 , 4 , ....
2°) Error Function
Formula:
Dµ Erf (b) = 2µ b1-µ2F~2
[ 1/2 , 1 ; (2-µ)/2 , (3-µ)/2 ; -b2 ]
Data Registers: • R00 = 2n > 3 ( Registers R00 thru R2n are to be initialized before executing "DERFB" )
• R01 ...... • R2n = the n components of the bion
Rn+1 .......... R6n: temp
>>> When the programs stop: R01
...... R2n = the n components of the result
Flags: /
Subroutines: B*B1 Z*B "B^Z"
ST*A DSA 1/Z Z/Z AMOVE ASWAP X+1
X/E3 X/2
STO U RCL U STO V RCL V STO W RCL W
"GAMZ" ( cf "Gamma Function for the HP-41" paragraph
1°) h-3) )
01 LBL "DERFB"
02 STO U 03 X<>Y 04 STO V 05 12 06 AMOVE 07 B*B1 08 SIGN 09 CHS 10 ST*A 11 12 12 ASWAP 13 RCL V 14 CHS 15 1 16 RCL U 17 - |
18 XEQ "B^Z"
19 RCL V 20 2 21 LN 22 * 23 2 24 RCL U 25 Y^X 26 RAD 27 P-R 28 Z*B 29 RCL V 30 CHS 31 X/2 32 STO V 33 1 34 RCL U |
35 X/2
36 - 37 STO U 38 XEQ "GAMZ" 39 1/Z 40 Z*B 41 RCL V 42 RCL U 43 .5 44 + 45 XEQ "GAMZ" 46 1/Z 47 Z*B 48 13 49 AMOVE 50 CLX 51 STO W |
52 LBL 01
53 B*B1 54 .5 55 RCL V 56 RCL U 57 RCL W 58 ST+ T 59 + 60 0 61 RDN 62 Z/Z 63 RCL U 64 R^ 65 + 66 RCL V 67 X<>Y 68 Z/Z |
69 Z*B
70 RCL W 71 X+1 72 STO W 73 DSA 74 X#0? 75 GTO 01 76 31 77 AMOVE 78 RCL 00 79 X/E3 80 ISG X 81 END |
( 154 bytes
/ SIZE 6n+1 )
STACK | INPUTS | OUTPUTS |
Y | Im(µ) | / |
X | Re(µ) | 1.2n |
where 1.2n is the control number of the result.
Example: µ = - 3.14 + 2.718
b = ( 0.1 + 0.2 i ) + ( 0.3 + 0.4 i ) e1 + ( 0.5 + 0.6 i ) e2 + ( 0.7 + 0.8 i ) e3 ( biquaternion -> 2n = 8 STO 00 )
0.1 STO 01 0.2 STO 02 0.3 STO 03 0.4 STO 04 0.5 STO 05 0.6 STO 06 0.7 STO 07 0.8 STO 08
2.718 ENTER^
3.14
CHS XEQ "DERFB" >>>> 1.008
---Execution time = 107s---
And we get in R01 thru R08:
Dµ Erf (b) = ( 92.69786293
+ 22.88014434 i ) + ( 10.00128922 - 32.33865620 i ) e1
+ ( 13.01491870 - 51.24840679 i ) e2 + ( 16.02854815 - 70.15815740
i ) e3
Note:
"DERFB" doesn't work if µ = 2 , 3 , 4 , ....
3°) Sine & Hyperbolic Sine Integral
Formulae:
• Sine Integral Dµ Si b = 2µ-2 PI b1-µ2F~3 ( 1/2 , 1 ; 3/2 , (2-µ)/2 , (3-µ)/2 ; -b2/4 )
• Hyperbolic Sine Integral
Dµ Shi b = 2µ-2 PI b1-µ2F~3
( 1/2 , 1 ; 3/2 , (2-µ)/2 , (3-µ)/2 ; b2/4 )
Data Registers: • R00 = 2n > 3 ( Registers R00 thru R2n are to be initialized before executing "DSIB" )
• R01 ...... • R2n = the n components of the bion
Rn+1 .......... R6n: temp
>>> When the programs stop: R01 ...... R2n = the n components of the result
Flag: F01
CF 01 <-> Sine Integral
SF 01 <-> Hyperbolic Sine Integral
Subroutines: B*B1 Z*B "B^Z"
ST*A ST/A DSA 1/Z Z/Z AMOVE ASWAP
X+1 X-1 X/E3 X/2 3X
STO U RCL U STO V RCL V STO W RCL W
"GAMZ" ( cf "Gamma Function for the HP-41" paragraph
1°) h-3) )
01 LBL "DSIB"
02 STO U 03 X<>Y 04 STO V 05 12 06 AMOVE 07 4 08 FC? 01 09 CHS 10 ST/A 11 B*B1 12 12 13 ASWAP 14 RCL V 15 CHS 16 RCL U 17 CHS 18 X+1 19 XEQ "B^Z" 20 RCL V 21 2 |
22 LN
23 * 24 2 25 RCL U 26 X-1 27 Y^X 28 RAD 29 P-R 30 PI 31 SQRT 32 ST* Z 33 * 34 Z*B 35 RCL V 36 CHS 37 RCL U 38 CHS 39 2 40 ST+ Y 41 ST/ Z 42 / |
43 XEQ "GAMZ"
44 1/Z 45 Z*B 46 RCL V 47 CHS 48 3 49 RCL U 50 - 51 2 52 ST/ Z 53 / 54 XEQ "GAMZ" 55 1/Z 56 Z*B 57 13 58 AMOVE 59 CLX 60 STO W 61 LBL 01 62 B*B1 63 .5 |
64 ENTER^
65 3X 66 RCL W 67 ST+ Z 68 + 69 / 70 RCL V 71 CHS 72 RCL U 73 CHS 74 2 75 ST+ Y 76 ST/ Z 77 / 78 RCL W 79 + 80 0 81 RDN 82 Z/Z 83 1 84 RCL U |
85 -
86 X/2 87 RCL W 88 X+1 89 STO W 90 + 91 RCL V 92 CHS 93 X/2 94 X<>Y 95 Z/Z 96 Z*B 97 DSA 98 X#0? 99 GTO 01 100 31 101 AMOVE 102 RCL 00 103 X/E3 104 ISG X 105 END |
( 185 bytes
/ SIZE 6n+1 )
STACK | INPUTS | OUTPUTS |
Y | Im(µ) | / |
X | Re(µ) | 1.2n |
where 1.2n is the control number of the result.
Example: µ = - 3.14 + 2.718
b = ( 0.1 + 0.2 i ) + ( 0.3 + 0.4 i ) e1 + ( 0.5 + 0.6 i ) e2 + ( 0.7 + 0.8 i ) e3 ( biquaternion -> 2n = 8 STO 00 )
0.1 STO 01 0.2 STO 02 0.3 STO 03 0.4 STO 04 0.5 STO 05 0.6 STO 06 0.7 STO 07 0.8 STO 08
• Sine Integral CF 01
2.718 ENTER^
3.14
CHS XEQ "DSIB" >>>> 1.008
---Execution time = 73s---
And we get in R01 thru R08:
Dµ Si (b) = ( 88.89748983
+ 17.11318190 i ) + ( 7.881812026 - 31.11285061 i ) e1
+ ( 9.806598695 - 49.16659190 i ) e2 + ( 11.73138538 - 67.22033322
i ) e3
• Hyperbolic sine Integral SF 01
2.718 ENTER^
3.14
CHS XEQ "DSIB" >>>> 1.008
---Execution time = 73s---
And we get in R01 thru R08:
Dµ Shi (b) = ( 91.68566449
+ 15.12680118 i ) + ( 7.235731000 - 32.14085759 i ) e1
+ ( 8.716471733 - 50.71859630 i ) e2 + ( 10.19721250 - 69.29633505
i ) e3
Note:
"DSIB" doesn't work if µ = 2 , 3 , 4 , ....
4°) Cosine & Hyperbolic Cosine Integral
Formulae:
• Cosine Integral
Dµ Ci b = b -µ [ (-1)µ-1 (µ-1) ! ] - 2µ-3 sqrt(PI) b2-µ2F~3 ( 1 , 1 ; 2 , (3-µ)/2 , (4-µ)/2 ; -b2/4 ) if µ is a positive integer
Dµ Ci b
= b -µ [ Ln b - Psi(1-µ) ] / Gam( 1 - µ
) - 2µ-3 sqrt(PI) b2-µ 2F~3
( 1 , 1 ; 2 , (3-µ)/2 , (4-µ)/2 ; -b2/4 )
otherwise
• Hyperbolic Cosine Integral
Dµ Chi b = b -µ [ (-1)µ-1 (µ-1) ! ] + 2µ-3 sqrt(PI) b2-µ2F~3 ( 1 , 1 ; 2 , (3-µ)/2 , (4-µ)/2 ; b2/4 ) if µ is a positive integer
Dµ
Chi b = b -µ [ Ln b - Psi(1-µ) ] / Gam( 1 - µ
) + 2µ-3 sqrt(PI) b2-µ 2F~3
( 1 , 1 ; 2 , (3-µ)/2 , (4-µ)/2 ; b2/4 )
otherwise
Data Registers: • R00 = 2n > 3 ( Registers R00 thru R2n are to be initialized before executing "DCIB" )
• R01 ...... • R2n = the n components of the bion
Rn+1 .......... R8n: temp
>>> When the programs stop: R01 ...... R2n = the n components of the result
Flag: F01
CF 01 <-> Cosine Integral
SF 01 <-> Hyperbolic Cosine Integral
Subroutines: B*B1 Z*B "B^Z"
"B^X" "LNB" ST*A ST/A DSA A+A 1/Z
Z/Z AMOVE ASWAP X+1 X-1 X/E3 X/2
STO U RCL U STO V RCL V STO W RCL W
"GAMZ" ( cf "Gamma Function for the HP-41" paragraph
1°) h-3) )
"PSIZ" ( cf "Gamma Function for the HP-41" paragraph
2°) b-2) )
01 LBL "DCIB"
02 STO U 03 X<>Y 04 STO V 05 12 06 AMOVE 07 14 08 AMOVE 09 B*B1 10 4 11 FC? 01 12 CHS 13 ST/A 14 12 15 ASWAP 16 RCL V 17 CHS 18 2 19 RCL U 20 - 21 XEQ "B^Z" 22 RCL V 23 2 24 LN 25 * 26 2 27 RCL U |
28 3
29 - 30 Y^X 31 RAD 32 P-R 33 PI 34 SQRT 35 FC? 01 36 CHS 37 ST* Z 38 * 39 Z*B 40 RCL V 41 CHS 42 3 43 RCL U 44 - 45 2 46 ST/ Z 47 / 48 XEQ "GAMZ" 49 1/Z 50 Z*B 51 RCL V 52 CHS 53 4 54 RCL U |
55 -
56 2 57 ST/ Z 58 / 59 XEQ "GAMZ" 60 1/Z 61 Z*B 62 13 63 AMOVE 64 CLX 65 STO W 66 LBL 01 67 B*B1 68 SIGN 69 ENTER^ 70 ST+ X 71 RCL W 72 ST+ Z 73 + 74 / 75 RCL V 76 CHS 77 X/2 78 RCL U 79 CHS 80 X+1 81 X/2 |
82 RCL W
83 X+1 84 STO W 85 + 86 0 87 RDN 88 Z/Z 89 RCL U 90 CHS 91 X/2 92 X+1 93 RCL W 94 + 95 RCL V 96 CHS 97 X/2 98 X<>Y 99 Z/Z 100 Z*B 101 DSA 102 X#0? 103 GTO 01 104 42 105 AMOVE 106 21 107 AMOVE 108 RCL V |
109 X#0?
110 GTO 00 111 RCL U 112 FRC 113 X#0? 114 GTO 00 115 LASTX 116 X<=0? 117 GTO 00 118 CHS 119 XEQ "B^X" 120 RCL U 121 X-1 122 FACT 123 1 124 CHS 125 LASTX 126 Y^X 127 * 128 ST*A 129 GTO 02 130 LBL 00 131 XEQ "LNB" 132 RCL V 133 CHS 134 1 135 RCL U |
136 -
137 XEQ "PSIZ" 138 ST- 01 139 X<>Y 140 ST- 02 141 RCL V 142 CHS 143 1 144 RCL U 145 - 146 XEQ "GAMZ" 147 1/Z 148 Z*B 149 12 150 ASWAP 151 RCL V 152 CHS 153 RCL U 154 CHS 155 XEQ "B^Z" 156 B*B1 157 LBL 02 158 32 159 AMOVE 160 A+A 161 END |
( 289
bytes / SIZE 8n+1 )
STACK | INPUTS | OUTPUTS |
Y | Im(µ) | / |
X | Re(µ) | 1.2n |
where 1.2n is the control number of the result.
Example: µ = - 3.14 + 2.718
b = ( 0.1 + 0.2 i ) + ( 0.3 + 0.4 i ) e1 + ( 0.5 + 0.6 i ) e2 + ( 0.7 + 0.8 i ) e3 ( biquaternion -> 2n = 8 STO 00 )
0.1 STO 01 0.2 STO 02 0.3 STO 03 0.4 STO 04 0.5 STO 05 0.6 STO 06 0.7 STO 07 0.8 STO 08
• Cosine Integral CF 01
2.718 ENTER^
3.14
CHS XEQ "DCIB" >>>> 1.008
---Execution time = 1m57s---
And we get in R01 thru R08:
Dµ Ci (b) = ( 710.4485622
- 666.171364 i ) + ( -221.0395251 - 265.3856402 i ) e1
+ ( -366.0525105 - 396.3184369 i ) e2 + ( -511.0654961 - 527.2512335
i ) e3
• Hyperbolic cosine Integral SF 01
2.718 ENTER^
3.14
CHS XEQ "DCIB" >>>> 1.008
---Execution time = 1m57s---
And we get in R01 thru R08:
Dµ Chi (b) = ( 687.5370555
- 661.8373032 i ) + ( -219.9848736 - 257.1821517 i ) e1
+ ( -363.7509751 - 383.6053669 i ) e2 + ( -507.5170767 - 510.0285821
i ) e3
Note:
"DCIB" doesn't work if µ = 3 , 4 , 5 , ....
5°) Exponential Integral Ei
Formulae:
Dµ Ei b = [ (-1)µ-1 (µ-1) ! ] b -µ + b1-µ 2F~2 ( 1 , 1 ; 2 , 2-µ ; b ) if µ is a positive integer
Dµ Ei b = [ Ln b - Psi(1-µ) ] b
-µ + b1-µ 2F~2
( 1 , 1 ; 2 , 2-µ ; b ) otherwise
Data Registers: • R00 = 2n > 3 ( Registers R00 thru R2n are to be initialized before executing "DEIB" )
• R01 ...... • R2n = the n components of the bion
Rn+1 .......... R6n: temp
>>> When the programs stop: R01 ...... R2n = the n components of the result
Flags: /
Subroutines: B*B1 Z*B "B^Z"
"B^X" "LNB" ST*A ST/A DSA A+A 1/Z
Z/Z AMOVE ASWAP X+1 X-1 X/E3 X/2
STO U RCL U STO V RCL V STO W RCL W
"GAMZ" ( cf "Gamma Function for the HP-41" paragraph
1°) h-3) )
"PSIZ" ( cf "Gamma Function for the HP-41" paragraph
2°) b-2) )
01 LBL "DEIB"
02 STO U 03 X<>Y 04 STO V 05 CHS 06 12 07 AMOVE 08 SIGN 09 RCL Z 10 - 11 XEQ "B^Z" 12 RCL V 13 CHS 14 2 15 RCL U 16 - 17 XEQ "GAMZ" 18 1/Z 19 Z*B 20 13 21 AMOVE |
22 CLX
23 STO W 24 LBL 01 25 B*B1 26 SIGN 27 ENTER^ 28 ST+ X 29 RCL W 30 ST+ Z 31 + 32 / 33 RCL V 34 CHS 35 RCL U 36 CHS 37 X+1 38 RCL W 39 X+1 40 STO W 41 + 42 0 |
43 RDN
44 Z/Z 45 Z*B 46 DSA 47 X#0? 48 GTO 01 49 21 50 AMOVE 51 RCL V 52 X#0? 53 GTO 00 54 RCL U 55 FRC 56 X#0? 57 GTO 00 58 LASTX 59 X<=0? 60 GTO 00 61 CHS 62 XEQ "B^X" 63 RCL U |
64 X-1
65 FACT 66 1 67 CHS 68 LASTX 69 Y^X 70 * 71 ST*A 72 GTO 02 73 LBL 00 74 XEQ "LNB" 75 RCL V 76 CHS 77 1 78 RCL U 79 - 80 XEQ "PSIZ" 81 ST- 01 82 X<>Y 83 ST- 02 84 RCL V |
85 CHS
86 1 87 RCL U 88 - 89 XEQ "GAMZ" 90 1/Z 91 Z*B 92 12 93 ASWAP 94 RCL V 95 CHS 96 RCL U 97 CHS 98 XEQ "B^Z" 99 B*B1 100 LBL 02 101 32 102 AMOVE 103 A+A 104 END |
( 197 bytes / SIZE 6n+1
)
STACK | INPUTS | OUTPUTS |
Y | Im(µ) | / |
X | Re(µ) | 1.2n |
where 1.2n is the control number of the result.
Example: µ = - 3.14 + 2.718
b = ( 0.1 + 0.2 i ) + ( 0.3 + 0.4 i ) e1 + ( 0.5 + 0.6 i ) e2 + ( 0.7 + 0.8 i ) e3 ( biquaternion -> 2n = 8 STO 00 )
0.1 STO 01
0.2 STO 02 0.3 STO 03
0.4 STO 04 0.5 STO 05
0.6 STO 06 0.7 STO 07
0.8 STO 08
2.718 ENTER^
3.14
CHS XEQ "DEIB" >>>> 1.008
---Execution time = 2m02s---
And we get in R01 thru R08:
Dµ Ei (b) = ( 779.2227206
- 646.7105020 i ) + ( -212.7491426 - 289.3230095 i ) e1
+ ( -355.0345034 - 434.3239636 i ) e2 + ( -497.3198642 - 579.3249176
i ) e3
Notes:
"DEIB" doesn't work if µ = 2 , 3 , 4 , ....
-In this program, lines 49 to 104 are identical to lines 106 to
161 of "DCIB"
-So, they could form a subroutine to save several bytes...
6°) Bessel & Modified Bessel Functions of
the 1st Kind
Formulae:
• Dµ Jm (b) = 2µ-2m sqrt(PI) b-m-µ Gam(m+1) 2F~3 [ (m+1)/2 , (m+2)/2 ; (m+1-µ)/2 , (m+2-µ)/2 , m+1 ; -b2/4 ]
• Dµ
Im (b) = 2µ-2m sqrt(PI) bm-µ
Gam(m+1) 2F~3 [ (m+1)/2 , (m+2)/2
; (m+1-µ)/2 , (m+2-µ)/2 , m+1 ; b2/4 ]
Data Registers: • R00 = 2n > 3 ( Registers R00 thru R2n are to be initialized before executing "DJNB" )
• R01 ...... • R2n = the n components of the bion
Rn+1 .......... R6n: temp
>>> When the programs stop: R01 ...... R2n = the n components of the result
Flag: F01
CF 01 <-> Bessel Functions
SF 01 <-> Modified Bessel Functions
Subroutines: B*B1 Z*B "B^Z"
"B^X" "LNB" ST*A ST/A DSA 1/Z Z*Z
Z/Z AMOVE ASWAP X+1 X-1 X/E3 X/2
STO R RCL R STO S RCL S
STO U RCL U STO V RCL V STO W RCL W
"GAMZ" ( cf "Gamma Function for the HP-41" paragraph
1°) h-3) )
01 LBL "DJNB"
02 STO R 03 RDN 04 STO S 05 RDN 06 STO U 07 X<>Y 08 STO V 09 12 10 AMOVE 11 B*B1 12 4 13 FC? 01 14 CHS 15 ST/A 16 12 17 ASWAP 18 RCL S 19 RCL V 20 - 21 RCL R 22 RCL U 23 - 24 XEQ "B^Z" 25 RCL S 26 ST+ X 27 RCL V |
28 -
29 2 30 LN 31 * 32 2 33 RCL R 34 ST+ X 35 RCL U 36 - 37 Y^X 38 RAD 39 P-R 40 0 41 PI 42 SQRT 43 R^ 44 R^ 45 Z/Z 46 Z*B 47 RCL S 48 RCL V 49 - 50 RCL R 51 RCL U 52 - 53 X+1 54 2 |
55 ST/ Z
56 / 57 XEQ "GAMZ" 58 1/Z 59 Z*B 60 RCL S 61 RCL V 62 - 63 RCL R 64 RCL U 65 - 66 2 67 ST+ Y 68 ST/ Z 69 / 70 XEQ "GAMZ" 71 1/Z 72 Z*B 73 13 74 AMOVE 75 CLX 76 STO W 77 LBL 01 78 B*B1 79 RCL S 80 X/2 81 STO M |
82 RCL R
83 X+1 84 X/2 85 RCL X 86 .5 87 + 88 RCL W 89 ST+ Z 90 + 91 STO N 92 R^ 93 X<>Y 94 Z*Z 95 RCL N 96 RCL U 97 X/2 98 - 99 STO O 100 RCL V 101 X/2 102 ST- M 103 CLX 104 RCL M 105 X<>Y 106 Z/Z 107 RCL O 108 .5 |
109 -
110 RCL M 111 X<>Y 112 Z/Z 113 RCL R 114 RCL W 115 X+1 116 STO W 117 + 118 RCL S 119 X<>Y 120 Z/Z 121 RCL W 122 ST/ Z 123 / 124 Z*B 125 DSA 126 X#0? 127 GTO 01 128 31 129 AMOVE 130 RCL 00 131 X/E3 132 ISG X 133 CLA 134 END |
( 240 bytes / SIZE 6n+1 )
STACK | INPUT | OUTPUT |
T | Im µ | / |
Z | Ré µ | / |
Y | Im m | / |
X | Ré m | 1.2n |
Where 1.2n is the control number of the result.
Examples: µ = - 3.14 + 2.718 , m = 1.4 + 1.6 i
b = ( 0.1 + 0.2 i ) + ( 0.3 + 0.4 i ) e1 + ( 0.5 + 0.6 i ) e2 + ( 0.7 + 0.8 i ) e3 ( biquaternion -> 2n = 8 STO 00 )
0.1 STO 01
0.2 STO 02 0.3 STO 03
0.4 STO 04 0.5 STO 05
0.6 STO 06 0.7 STO 07
0.8 STO 08
• Bessel Function JNB CF 01
2.718 ENTER^
3.14
CHS
1.6
ENTER^
1.4
XEQ "DJNB" >>>> 1.008
---Execution time = 86s---
And we get in R01 thru R08:
Dµ Jm (b)
= ( -0.081011033 - 0.280385817 i ) + ( -0.095601814 + 0.020153179 i ) e1
+ ( -0.147526575 + 0.039087105 i ) e2 + ( -0.199451336 + 0.058021031
i ) e3
• Modified Bessel Function INB SF 01
2.718 ENTER^
3.14
CHS
1.6
ENTER^
1.4
XEQ "DJNB" >>>> 1.008
---Execution time = 86s---
And we get in R01 thru R08:
Dµ Im (b)
= ( -0.111691407 - 0.292384212 i ) + ( -0.100055670 + 0.030356977 i ) e1
+ ( -0.153658287 + 0.055361337 i ) e2 + ( -0.207260904 + 0.080365697
i ) e3
Note:
-This program doesn't work if (m+1-µ)/2 or (m+2-µ)/2
= 0 , -1 , -2 , ....
7°) Bessel & Modified Bessel Functions of
the 2nd Kind - Non-Integer Order
Formulae:
Assuming m is not an integer,
• Dµ Ym (b) = 2µ-2m (PI)1/2 b-µ-m csc(m.PI) { -16m Gam(1-m) 2F~3 [ (1-m)/2 , (2-m)/2 ; (1-µ-m)/2 , (2-µ-m)/2 , 1-m ; -b2/4 ]
+ b2m Cos(m.PI) Gam(m+1) 2F~3 [ (m+1)/2 , (m+2)/2 ; (m+1-µ)/2 , (m+2-µ)/2 , m+1 ; -b2/4 ] }
• Dµ Km (b) = 2µ-2m-1 (PI)3/2 b-µ-m csc(m.PI) { 16m Gam(1-m) 2F~3 [ (1-m)/2 , (2-m)/2 ; (1-µ-m)/2 , (2-µ-m)/2 , 1-m ; b2/4 ]
- b2m Gam(m+1) 2F~3 [
(m+1)/2 , (m+2)/2 ; (m+1-µ)/2 , (m+2-µ)/2 , m+1 ; b2/4
] }
Data Registers: • R00 = 2n > 3 ( Registers R00 thru R2n are to be initialized before executing "DYNB" )
• R01 ...... • R2n = the n components of the bion
Rn+1 .......... R10n: temp
>>> When the programs stop: R01 ...... R2n = the n components of the result
Flags: F04 & F01
CF 01 <-> Bessel Functions
SF 01 <-> Modified Bessel Functions
Subroutines: B*B1 Z*B "B^Z"
"B^X" "LNB" ST*A ST/A DSA A-A 1/Z
Z*Z Z/Z AMOVE ASWAP X+1 X-1 X/E3
X/2 SINH COSH
STO R RCL R STO S RCL S
STO U RCL U STO V RCL V STO W RCL W
"GAMZ" ( cf "Gamma Function for the HP-41" paragraph
1°) h-3) )
01 LBL "DYNB"
02 STO R 03 RDN 04 STO S 05 RDN 06 STO U 07 X<>Y 08 STO V 09 12 10 AMOVE 11 14 12 AMOVE 13 B*B1 14 4 15 FC? 01 16 CHS 17 ST/A 18 12 19 ASWAP 20 RCL S 21 ST+ X 22 RCL R 23 ST+ X 24 XEQ "B^Z" 25 FS? 01 26 GTO 00 27 RCL S 28 PI 29 * 30 COSH 31 LASTX |
32 SINH
33 RCL R 34 PI 35 * 36 RAD 37 1 38 P-R 39 ST* T 40 RDN 41 * 42 CHS 43 X<>Y 44 Z*B 45 LBL 00 46 SF 04 47 XEQ 01 48 35 49 AMOVE 50 CLX 51 ST*A 52 RCL S 53 16 54 LN 55 * 56 16 57 RCL R 58 Y^X 59 RAD 60 P-R 61 STO 01 62 X<>Y |
63 STO 02
64 RCL R 65 CHS 66 STO R 67 RCL S 68 CHS 69 STO S 70 LBL 01 71 RCL S 72 RCL V 73 - 74 X/2 75 RCL R 76 RCL U 77 - 78 X+1 79 X/2 80 XEQ "GAMZ" 81 1/Z 82 Z*B 83 RCL S 84 RCL V 85 - 86 RCL R 87 RCL U 88 - 89 2 90 ST+ Y 91 ST/ Z 92 / 93 XEQ "GAMZ" |
94 1/Z
95 Z*B 96 13 97 AMOVE 98 CLX 99 STO W 100 LBL 02 101 B*B1 102 RCL S 103 X/2 104 STO M 105 RCL R 106 X+1 107 X/2 108 RCL X 109 .5 110 + 111 RCL W 112 ST+ Z 113 + 114 STO N 115 R^ 116 X<>Y 117 Z*Z 118 RCL N 119 RCL U 120 X/2 121 - 122 STO O 123 RCL V 124 X/2 |
125 ST- M
126 CLX 127 RCL M 128 X<>Y 129 Z/Z 130 RCL O 131 .5 132 - 133 RCL M 134 X<>Y 135 Z/Z 136 RCL R 137 RCL W 138 X+1 139 STO W 140 + 141 RCL S 142 X<>Y 143 Z/Z 144 RCL W 145 ST/ Z 146 / 147 Z*B 148 DSA 149 X#0? 150 GTO 02 151 FS?C 04 152 RTN 153 51 154 AMOVE 155 32 |
156 AMOVE
157 A-A 158 12 159 AMOVE 160 41 161 AMOVE 162 RCL S 163 RCL V 164 - 165 RCL R 166 RCL U 167 - 168 XEQ "B^Z" 169 RCL V 170 RCL S 171 ST+ X 172 + 173 2 174 LN 175 * 176 2 177 RCL U 178 RCL R 179 ST+ X 180 + 181 FS? 01 182 X-1 183 Y^X 184 RAD 185 P-R 186 PI |
187 SQRT
188 3 189 FC? 01 190 SIGN 191 Y^X 192 FS? 01 193 CHS 194 ST* Z 195 * 196 Z*B 197 RCL S 198 CHS 199 PI 200 * 201 SINH 202 LASTX 203 COSH 204 RCL R 205 CHS 206 PI 207 * 208 1 209 P-R 210 ST* T 211 RDN 212 * 213 1/Z 214 Z*B 215 B*B1 216 DEG 217 END |
(
374 bytes / SIZE 10n + 1 )
STACK | INPUT | OUTPUT |
T | Im µ | / |
Z | Ré µ | / |
Y | Im m | / |
X | Ré m | 1.2n |
Where 1.2n is the control number of the result.
Examples: µ = - 3.14 + 2.718 , m = 1.4 + 1.6 i
b = ( 0.1 + 0.2 i ) + ( 0.3 + 0.4 i ) e1 + ( 0.5 + 0.6 i ) e2 + ( 0.7 + 0.8 i ) e3 ( biquaternion -> 2n = 8 STO 00 )
0.1 STO 01
0.2 STO 02 0.3 STO 03
0.4 STO 04 0.5 STO 05
0.6 STO 06 0.7 STO 07
0.8 STO 08
• Bessel Function YNB CF 01
2.718 ENTER^
3.14
CHS
1.6
ENTER^
1.4
XEQ "DYNB" >>>> 1.008
---Execution time = 2m53s---
And we get in R01 thru R08:
Dµ Ym (b)
= ( -1892.715638 + 7911.974088 i ) + ( 2761.990236 + 834.1330057 i ) e1
+ ( 4375.435409 + 1080.288271 i ) e2 + ( 5988.880583 + 1326.443537
i ) e3
• Modified Bessel Function KNB SF 01
2.718 ENTER^
3.14
CHS
1.6
ENTER^
1.4
XEQ "DYNB" >>>> 1.008
---Execution time = 2m50s---
And we get in R01 thru R08:
Dµ Km (b)
= ( 2353.469212 - 12981.08719 i ) + ( -4547.159624 - 1102.355632 i ) e1
+ ( -7181.757460 - 1355.902014 i ) e2 + ( -9816.355301 - 1609.448398
i ) e3
Note:
-This program doesn't work if (m+1-µ)/2 or (m+2-µ)/2
or (1-µ-m)/2 or (2-µ-m)/2 = 0 , -1 , -2 ,
....
8°) Spherical Bessel Functions of the 1st Kind
Formula:
Dµ jn
(b) = 2µ-2m-1 PI bm-µ Gam(m+1)
2F~3
[ (m+1)/2 , (m+2)/2 ; (m+1-µ)/2 , (m+2-µ)/2 , m+3/2 ; -b2/4
]
Data Registers: • R00 = 2n > 3 ( Registers R00 thru R2n are to be initialized before executing "DBS1B" )
• R01 ...... • R2n = the n components of the bion
Rn+1 .......... R6n: temp
>>> When the programs stop: R01 ...... R2n = the n components of the result
Flags: /
Subroutines: B*B1 Z*B "B^Z"
ST*A ST/A DSA 1/Z Z*Z Z/Z AMOVE
ASWAP X+1 X-1 X/E3 X/2
STO R RCL R STO S RCL S
STO U RCL U STO V RCL V STO W RCL W
"GAMZ" ( cf "Gamma Function for the HP-41" paragraph
1°) h-3) )
01 LBL "DBS1B"
02 STO R 03 RDN 04 STO S 05 RDN 06 STO U 07 X<>Y 08 STO V 09 12 10 AMOVE 11 B*B1 12 4 13 CHS 14 ST/A 15 12 16 ASWAP 17 RCL S 18 RCL V 19 - 20 RCL R 21 RCL U 22 - 23 XEQ "B^Z" 24 RCL S 25 RCL R 26 X+1 27 XEQ "GAMZ" 28 Z*B 29 RCL S |
30 RCL V
31 - 32 X/2 33 RCL R 34 RCL U 35 - 36 X+1 37 X/2 38 XEQ "GAMZ" 39 1/Z 40 Z*B 41 RCL S 42 RCL V 43 - 44 RCL R 45 RCL U 46 - 47 2 48 ST+ Y 49 ST/ Z 50 / 51 XEQ "GAMZ" 52 1/Z 53 Z*B 54 RCL S 55 RCL R 56 1.5 57 + 58 XEQ "GAMZ" |
59 1/Z
60 Z*B 61 13 62 AMOVE 63 CLX 64 STO W 65 LBL 01 66 B*B1 67 RCL S 68 X/2 69 STO M 70 RCL R 71 X+1 72 X/2 73 RCL X 74 .5 75 + 76 RCL W 77 ST+ Z 78 + 79 STO N 80 R^ 81 X<>Y 82 Z*Z 83 RCL N 84 RCL U 85 X/2 86 - 87 STO O |
88 RCL V
89 X/2 90 ST- M 91 CLX 92 RCL M 93 X<>Y 94 Z/Z 95 RCL O 96 .5 97 - 98 RCL M 99 X<>Y 100 Z/Z 101 RCL R 102 .5 103 + 104 RCL W 105 X+1 106 STO W 107 + 108 RCL S 109 X<>Y 110 Z/Z 111 RCL W 112 ST/ Z 113 / 114 Z*B 115 DSA 116 X#0? |
117 GTO 01
118 31 119 AMOVE 120 RCL V 121 RCL S 122 ST+ X 123 - 124 2 125 LN 126 * 127 2 128 RCL U 129 RCL R 130 ST+ X 131 - 132 X-1 133 Y^X 134 RAD 135 P-R 136 PI 137 ST* Z 138 * 139 Z*B 140 RCL 00 141 X/E3 142 ISG X 143 DEG 144 CLA 145 END |
( 274
bytes / SIZE 6n+1 )
STACK | INPUT | OUTPUT |
T | Im µ | / |
Z | Ré µ | / |
Y | Im m | / |
X | Ré m | 1.2n |
Where 1.2n is the control number of the result.
Examples: µ = - 3.14 + 2.718 , m = 1.4 + 1.6 i
b = ( 0.1 + 0.2 i ) + ( 0.3 + 0.4 i ) e1 + ( 0.5 + 0.6 i ) e2 + ( 0.7 + 0.8 i ) e3 ( biquaternion -> 2n = 8 STO 00 )
0.1 STO 01
0.2 STO 02 0.3 STO 03
0.4 STO 04 0.5 STO 05
0.6 STO 06 0.7 STO 07
0.8 STO 08
2.718 ENTER^
3.14
CHS
1.6
ENTER^
1.4
XEQ "DBS1B" >>>> 1.008
---Execution time = 1m45s---
And we get in R01 thru R08:
Dµ jm (b)
= ( -0.090245462 - 0.129873520 i ) + ( -0.045563143 + 0.026935641 i ) e1
+ ( -0.068923652 + 0.045664651 i ) e2 + ( -0.092284161 + 0.064393662
i ) e3
Note:
-This program doesn't work if (m+1-µ)/2 or (m+2-µ)/2
or m+3/2 or m+1 = 0 , -1 , -2 , ....
9°) Hermite Functions
Formula:
Dµ
Hm (b) = [ 2m+µ (PI) b-µ /
Gam((1-m)/2) ] 2F~2 [ 1 , -m/2 ; (1-µ)/2
, (2-µ)/2 ; b2 ]
- [ 2m+µ (PI) b1-µ / Gam((-m)/2) ] 2F~2
[ 1 , (1-m)/2 ; 1-µ/2 , (3-µ)/2 ; b2 ]
Data Registers: • R00 = 2n > 3 ( Registers R00 thru R2n are to be initialized before executing "DHNB" )
• R01 ...... • R2n = the n components of the bion
Rn+1 .......... R8n: temp
>>> When the programs stop: R01 ...... R2n = the n components of the result
Flag: F04
Subroutines: B*B1 Z*B "B^Z"
ST*A ST/A DSA A-A 1/Z Z*Z Z/Z AMOVE
ASWAP X+1 X-1 X/E3 X/2
STO R RCL R STO S RCL S
STO U RCL U STO V RCL V STO W RCL W
"GAMZ" ( cf "Gamma Function for the HP-41" paragraph
1°) h-3) )
01 LBL "DHNB"
02 CHS 03 STO R 04 RDN 05 CHS 06 STO S 07 RDN 08 CHS 09 STO U 10 X<>Y 11 CHS 12 STO V 13 12 14 AMOVE 15 B*B1 16 12 17 ASWAP 18 14 19 AMOVE 20 RCL V 21 RCL U 22 XEQ "B^Z" 23 RCL S 24 X/2 25 RCL R 26 X+1 27 X/2 |
28 XEQ "GAMZ"
29 1/Z 30 Z*B 31 SF 04 32 XEQ 01 33 41 34 AMOVE 35 34 36 AMOVE 37 RCL V 38 RCL U 39 X+1 40 STO U 41 XEQ "B^Z" 42 RCL S 43 X/2 44 RCL R 45 X/2 46 XEQ "GAMZ" 47 1/Z 48 Z*B 49 RCL R 50 X+1 51 STO R 52 LBL 01 53 RCL V 54 X/2 |
55 RCL U
56 X+1 57 X/2 58 XEQ "GAMZ" 59 1/Z 60 Z*B 61 RCL V 62 X/2 63 RCL U 64 X/2 65 X+1 66 XEQ "GAMZ" 67 1/Z 68 Z*B 69 13 70 AMOVE 71 CLX 72 STO W 73 LBL 02 74 B*B1 75 RCL S 76 X/2 77 RCL R 78 X/2 79 RCL U 80 X+1 81 X/2 |
82 RCL W
83 ST+ Z 84 + 85 RCL V 86 X/2 87 STO M 88 X<>Y 89 Z/Z 90 RCL U 91 X/2 92 RCL W 93 X+1 94 STO W 95 + 96 RCL M 97 X<>Y 98 Z/Z 99 Z*B 100 DSA 101 X#0? 102 GTO 02 103 FS?C 04 104 RTN 105 41 106 AMOVE 107 32 108 AMOVE |
109 A-A
110 RCL S 111 RCL V 112 + 113 CHS 114 2 115 LN 116 * 117 2 118 RCL X 119 RCL U 120 - 121 RCL R 122 - 123 Y^X 124 RAD 125 P-R 126 PI 127 ST* Z 128 * 129 Z*B 130 RCL 00 131 X/E3 132 ISG X 133 DEG 134 CLA 135 END |
(
268 bytes / SIZE 8n+1 )
STACK | INPUT | OUTPUT |
T | Im µ | / |
Z | Ré µ | / |
Y | Im m | / |
X | Ré m | 1.2n |
Where 1.2n is the control number of the result.
Examples: µ = - 3.14 + 2.718 , m = 1.4 + 1.6 i
b = ( 0.1 + 0.2 i ) + ( 0.3 + 0.4 i ) e1 + ( 0.5 + 0.6 i ) e2 + ( 0.7 + 0.8 i ) e3 ( biquaternion -> 2n = 8 STO 00 )
0.1 STO 01
0.2 STO 02 0.3 STO 03
0.4 STO 04 0.5 STO 05
0.6 STO 06 0.7 STO 07
0.8 STO 08
2.718 ENTER^
3.14
CHS
1.6
ENTER^
1.4
XEQ "DHNB" >>>> 1.008
---Execution time = 3m54s---
And we get in R01 thru R08:
Dµ Hm (b)
= ( -161.6892489 + 1659.074697 i ) + ( 583.8677460 + 91.94274680 i ) e1
+ ( 918.1891038 + 96.72126511 i ) e2 + ( 1252.510462 + 101.4997838
i ) e3
Note:
-This program doesn't work if -m/2 or (1-m)/2
or (1-µ)/2 or (2-µ)/2 = 0 , -1 , -2
, ....
10°) Fresnel Integrals
Formulae:
• Fresnel Cosine Integral Dµ C(b) = 22µ-3/2 PI3/2 b1-µ3F~4 [ 1/4 , 3/4 , 1 ; (2-µ)/4 , (3-µ)/4 , (4-µ)/4 , (5-µ)/4 ; -(PI)2 b4/16 ]
• Fresnel Sine Integral
Dµ S(b) = 22µ-11/2 PI5/2 b3-µ3F~4
[ 3/4 , 1 , 5/4 ; (4-µ)/4 , (5-µ)/4 , (6-µ)/4 , (6-µ)/4
; -(PI)2 b4/16 ]
Data Registers: • R00 = 2n > 3 ( Registers R00 thru R2n are to be initialized before executing "DCSB" )
• R01 ...... • R2n = the n components of the bion
Rn+1 .......... R6n: temp
>>> When the programs stop: R01 ...... R2n = the n components of the result
Flags: F01
CF 01 <-> Fresnel Cosine Integral
SF 01 <-> Fresnel Sine Integral
Subroutines: B*B1 Z*B "B^Z"
ST*A ST/A DSA 1/Z Z*Z Z/Z AMOVE
ASWAP X+1 X-1 X/E3 X/2
STO U RCL U STO V RCL V STO W RCL W
"GAMZ" ( cf "Gamma Function for the HP-41" paragraph
1°) h-3) )
01 LBL "DCSB"
02 STO U 03 X<>Y 04 STO V 05 12 06 AMOVE 07 13 08 AMOVE 09 B*B1 10 12 11 AMOVE 12 B*B1 13 PI 14 4 15 / 16 X^2 17 CHS 18 ST*A 19 12 20 AMOVE 21 31 22 AMOVE 23 RCL V 24 CHS 25 3 26 FC? 01 27 SIGN 28 RCL U 29 - 30 XEQ "B^Z" 31 RCL V 32 ST+ X 33 2 |
34 LN
35 * 36 2 37 RCL U 38 ST+ X 39 FC? 01 40 1.5 41 FS? 01 42 5.5 43 - 44 Y^X 45 RAD 46 P-R 47 PI 48 SQRT 49 3 50 Y^X 51 PI 52 FC? 01 53 SIGN 54 * 55 ST* Z 56 * 57 Z*B 58 RCL V 59 CHS 60 4 61 / 62 STO V 63 2 64 FS? 01 65 X^2 66 RCL U |
67 -
68 STO U 69 4 70 / 71 XEQ "GAMZ" 72 1/Z 73 Z*B 74 RCL V 75 RCL U 76 X+1 77 4 78 / 79 XEQ "GAMZ" 80 1/Z 81 Z*B 82 RCL V 83 RCL U 84 2 85 + 86 4 87 / 88 XEQ "GAMZ" 89 1/Z 90 Z*B 91 RCL V 92 RCL U 93 3 94 + 95 4 96 / 97 XEQ "GAMZ" 98 1/Z 99 Z*B |
100 13
101 AMOVE 102 CLX 103 STO W 104 LBL 01 105 B*B1 106 3 107 FC? 01 108 SIGN 109 4 110 / 111 RCL W 112 + 113 STO Y 114 .5 115 + 116 * 117 RCL V 118 RCL U 119 4 120 / 121 RCL W 122 + 123 0 124 RDN 125 Z/Z 126 RCL U 127 X+1 128 4 129 / 130 RCL W 131 + 132 RCL V |
133 X<>Y
134 Z/Z 135 RCL U 136 2 137 + 138 4 139 / 140 RCL W 141 + 142 RCL V 143 X<>Y 144 Z/Z 145 RCL U 146 X-1 147 4 148 / 149 RCL W 150 X+1 151 STO W 152 + 153 RCL V 154 X<>Y 155 Z/Z 156 Z*B 157 DSA 158 X#0? 159 GTO 01 160 31 161 AMOVE 162 RCL 00 163 X/E3 164 ISG X 165 END |
( 283 bytes / SIZE
6n+1 )
STACK | INPUTS | OUTPUTS |
Y | Im(µ) | / |
X | Re(µ) | 1.2n |
where 1.2n is the control number of the result.
Example: µ = - 3.14 + 2.718
b = ( 0.1 + 0.2 i ) + ( 0.3 + 0.4 i ) e1 + ( 0.5 + 0.6 i ) e2 + ( 0.7 + 0.8 i ) e3 ( biquaternion -> 2n = 8 STO 00 )
0.1 STO 01 0.2 STO 02 0.3 STO 03 0.4 STO 04 0.5 STO 05 0.6 STO 06 0.7 STO 07 0.8 STO 08
• Fresnel Cosine Integral CF 01
2.718 ENTER^
3.14
CHS XEQ "DCSB" >>>> 1.008
---Execution time = 2m12s---
And we get in R01 thru R08:
Dµ C(b) = ( 90.17195748
+ 21.68847925 i ) + ( 9.528403749 - 31.46967540 i ) e1
+ ( 12.34673582 - 49.85496592 i ) e2 + ( 15.16506788 - 68.24025647
i ) e3
• Fresnel Sine Integral SF 01
2.718 ENTER^
3.14
CHS XEQ "DCSB" >>>> 1.008
---Execution time = 2m12s---
And we get in R01 thru R08:
Dµ S(b) = ( 14.88193371
- 8.573304291 i ) + ( -2.729648778 - 5.445395145 i ) e1
+ ( -4.693883700 - 8.276444519 i ) e2 + ( -6.658118618 - 11.10749388
i ) e3
Notes:
CF 01 "DCSB" doesn't work if µ = 2 , 3 ,
4 , ....
SF 01 "DCSB" doesn't work if µ = 4 , 5 ,
6 , ....
11°) Airy Functions
Formulae:
Dµ Ai(b) = 3µ-4/3 b -µ { 32/3 Gam(1/3) 2F~3 [ 1/3 , 1 ; (1-µ)/3 , (2-µ)/3 , (3-µ)/3 ; b3/9 ] - b Gam(2/3) 2F~3 [ 2/3 , 1 ; (4-µ)/3 , (2-µ)/3 , (3-µ)/3 ; b3/9 ] }
Dµ Bi(b) = 3µ-5/6
b -µ { 32/3 Gam(1/3) 2F~3
[ 1/3 , 1 ; (1-µ)/3 , (2-µ)/3 , (3-µ)/3 ; b3/9
] + b Gam(2/3) 2F~3 [ 2/3 , 1 ; (4-µ)/3
, (2-µ)/3 , (3-µ)/3 ; b3/9 ] }
"DAIRYB" calculates Dµ Ai(b)
& Dµ Bi(b) simultaneously and stores the
results in R01 thru R4n
Data Registers: • R00 = 2n > 3 ( Registers R00 thru R2n are to be initialized before executing "DAIRYB" )
• R01 ...... • R2n = the n components of the bion
R4n+1 .......... R8n: temp
>>> When the programs stop: R01
...... R2n = the n components of Dµ Ai(b)
R2n+1 ..... R4n = ------------------- Dµ
Bi(b)
Flag: F04
Subroutines: B*B1 Z*B "B^Z"
ST*A ST/A DSA A+A A-A 1/Z Z*Z
Z/Z AMOVE ASWAP X+1 X-1 X/E3 X/3
STO U RCL U STO V RCL V STO W RCL W
"GAMZ" ( cf "Gamma Function for the HP-41" paragraph
1°) h-3) )
-Line 25 is 3^(2/.3) Gam(1/3)
-Line 27 is Gam(2/3)
01 LBL "DAIRYB"
02 CHS 03 STO U 04 X<>Y 05 CHS 06 STO V 07 12 08 AMOVE 09 14 10 AMOVE 11 B*B1 12 B*B1 13 9 14 ST/A 15 12 16 ASWAP 17 SF 04 18 LBL 01 19 RCL V 20 RCL U 21 FS? 04 22 X+1 23 XEQ "B^Z" 24 FC? 04 25 5.572416709 26 FS? 04 27 1.354117939 28 ST*A 29 RCL V 30 2 |
31 RCL U
32 + 33 3 34 ST/ Z 35 / 36 XEQ "GAMZ" 37 1/Z 38 Z*B 39 RCL V 40 3 41 RCL U 42 + 43 3 44 ST/ Z 45 / 46 XEQ "GAMZ" 47 1/Z 48 Z*B 49 RCL V 50 CHS 51 3 52 LN 53 * 54 3 55 RCL U 56 CHS 57 Y^X 58 RAD 59 P-R 60 Z*B |
61 RCL V
62 4 63 FC? 04 64 SIGN 65 RCL U 66 + 67 3 68 ST/ Z 69 / 70 XEQ "GAMZ" 71 1/Z 72 Z*B 73 13 74 AMOVE 75 CLX 76 STO W 77 LBL 02 78 B*B1 79 SIGN 80 FS? 04 81 ST+ X 82 X/3 83 RCL W 84 + 85 RCL V 86 X/3 87 STO M 88 2 89 RCL U 90 + |
91 X/3
92 RCL W 93 + 94 0 95 RDN 96 Z/Z 97 4 98 FC? 04 99 SIGN 100 RCL U 101 + 102 X/3 103 RCL W 104 + 105 RCL M 106 X<>Y 107 Z/Z 108 RCL U 109 X/3 110 RCL W 111 X+1 112 STO W 113 + 114 RCL M 115 X<>Y 116 Z/Z 117 Z*B 118 DSA 119 X#0? 120 GTO 02 |
121 31
122 AMOVE 123 FC?C 04 124 RTN 125 14 126 ASWAP 127 XEQ 01 128 42 129 AMOVE 130 A+A 131 3 132 5 133 6 134 / 135 Y^X 136 ST/A 137 13 138 ASWAP 139 A-A 140 3 141 4 142 RCL Y 143 / 144 Y^X 145 ST/A 146 32 147 AMOVE 148 R^ 149 CLA 150 END |
( 290 bytes / SIZE
8n+1 )
STACK | INPUTS | OUTPUTS |
Y | Im(µ) | / |
X | Re(µ) | 1.2n |
where 1.2n is the control number of the result.
Example: µ = - 3.14 + 2.718
b = ( 0.1 + 0.2 i ) + ( 0.3 + 0.4 i ) e1 + ( 0.5 + 0.6 i ) e2 + ( 0.7 + 0.8 i ) e3 ( biquaternion -> 2n = 8 STO 00 )
0.1 STO 01
0.2 STO 02 0.3 STO 03
0.4 STO 04 0.5 STO 05
0.6 STO 06 0.7 STO 07
0.8 STO 08
2.718 ENTER^
3.14
CHS XEQ "DCSB" >>>> 1.008
---Execution time = 3m07s---
We get in R01 thru R08:
Dµ Ai(b) = ( -120.0272076
- 52.59871479 i ) + ( -21.13210755 + 41.41275647 i ) e1
+ ( -29.65306724 + 66.29446871 i ) e2 + ( -38.17402699 + 91.17618097
i ) e3
and in registers R09 thru R16:
Dµ Bi(b) = ( -127.7699680
- 75.03970383 i ) + ( -29.27191706 + 43.70059943 i ) e1
+ ( -42.16814267 + 70.51468851 i ) e2 + ( -55.06436825 + 97.32877755
i ) e3
Note:
µ must be different from 1 , 2 , 3 , .....