This program is Copyright © 2006 by Jean-Marc Baillard and is used here by permission.
This program is supplied without representation or warranty of any kind. Jean-Marc Baillard and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.
Overview
-The Struve function is defined by Hn(x)
= (x/2)n+1 SUM k>=0 (-1)k(x/2)2k/
( Gam(k+3/2).Gam(k+n+3/2) )
and the modified Struve function: Ln(x)
= (x/2)n+1 SUM k>=0 (x/2)2k/
( Gam(k+3/2).Gam(k+n+3/2) )
Program Listing
Data Registers: /
Flag:
Clear flag F01 to compute Hn(x)
Set flag F01 to calculate Ln(x)
Subroutine: "GAM" ( Gamma function
)
01 LBL "HLNX"
02 2
03 /
04 STO M
05 X<>Y
06 STO N
07 STO O
08 1
09 +
10 Y^X
11 ST+ X
12 PI
13 SQRT
14 /
15 1.5
16 ST+ N
17 ST+ O
18 RCL Y
19 ENTER^
20 LBL 01
21 X<> T
22 RCL M
23 X^2
24 *
25 FC? 01
26 CHS
27 R^
28 /
29 RCL N
30 /
31 STO T
32 ISG Z
33 ""
TEXT0 or another NOP instruction like LBL 02 STO
X ... etc ...
34 ISG N
35 ""
TEXT0 or another NOP instruction like LBL 02 STO
X ... etc ...
36 X<>Y
37 ST+ Y
38 X#Y?
39 GTO 01
40 X<> O
41 XEQ "GAM"
42 ST/ O
43 RCL O
44 CLA
45 END
( 79 bytes / SIZE 000 )
STACK | INPUTS | OUTPUTS |
Y | n | Gam(n+3/2) |
X | x | Hn(x) or Ln(x) |
X-output = Hn(x) if CF 01 or Ln(x) if SF 01
Example: Compute H1.2 ( 3.4 ) and L1.2 ( 3.4 )
CF 01
1.2 ENTER^
3.4 XEQ "HLNX" >>>> 1.113372654
( in 12 seconds )
SF 01
1.2 ENTER^
3.4 XEQ "HLNX" >>>> 4.649129448
( in 12 seconds )
-Unlike Hn(x) , Ln(x) is accurately computed for
large arguments by these series.
Reference: Abramowitz
and Stegun , "Handbook of Mathematical Functions" - Dover Publications
- ISBN 0-486-61272-4
Go back to the HP-41 software library
Go back to the general software library
Go
back to the main exhibit hall