Upload
kgrhoads
View
212
Download
0
Embed Size (px)
Citation preview
8/20/2019 jresv77Bn3-4p125
http://slidepdf.com/reader/full/jresv77bn3-4p125 1/8
JOURNAL
OF
RESE
A RCH
of
the Nationa l B
ure
a u of Standards - B.
Mathem
atic
al
Sciences
Vol. 77A , Nos.
3 4
, j u l
y-
Dec embe r 19
7
essel Functions
of
Real rgument and
Integer
Order
David
J.
Sookne
J
Institute for Basic Standards,
National
Bureau of
Standards, Washington
, D.C. 20234
(June 4,
1973)
A comp
ut
er program is desc ribed for
ca
lc ul ating Bessel Functions J x) and I x), for
x
real, and
n a
nonn
egative int
ege
r.
Th
e
method used
is th
at
of b
ackward
r
ec ur
sion , with st rict con trol
of
e
rror
.
Key word s: Bac
kward
recursion; Bessel func tions; difference equat ion; e rror
bound
s; M ll er al
go
rithms .
1. Method
G
iv
en a r
ea
l
number x
and a positive integer
NB, BESLRI
calc
ulat
es eith
er
I x),
n = 0, 1
.
.
.,
NB - 1
} n X),
n
=
0, 1, . , NB - 1
arit
hmetic.
The
method,
which is described in is based on algorithms of
[2]
and Miller
[3], app lied
to the d iffer e
nce equat
ion
2n
Y
- I
= -
Yll
-
SIGN
YII+ I
x
SIGN
is +
1 for}
s ,
- 1
for
J s
o
1)
Th e program sets MAGX
= [ Ix I ],
the
integer
part of
Ix
I
P
MAGX
=
0,
P MAGX +
I
=
1, and
en s uccess iv e ly calculat
es
2n
PII +I
=
N PII - SIGN - I
n=MAGX +
1,
MAGX +
2,
2)
e
nce
is strictly increasin
g.
The
prog
ram takes
N
to
be the least
n
such that
Pit
exce
eds a
TEST
defined in
sec
tions
2
and
3.
It th en sets yW) =
0,
~ ~ I =
1/p v,
and rec urs back ward
ing
1).
The computed sequence Y b
V
,
yl
N),
•
is th e recessive solut ion of
1)
which satis fi
es
the
ndary condition YM AG X
= 1.
From
this
solution, th e I s and} s
are
found by normali zing
n= 0 , 1 ,
.,
NB - }
n =
0,1 ,
.,
NB- }
AMS Sllbject Cfnss i
jinJl
i o
fl
; 68 A10.
I Pre
sent add r
ess:
W.U.J.S. Institute. Arad. lsraeL
: Fi gures in br ackets in dicate the lit er atur e ref er e lJces at the e
nd
uf this pap cc
125
8/20/2019 jresv77Bn3-4p125
http://slidepdf.com/reader/full/jresv77bn3-4p125 2/8
where
[ .V/ t [
J-t = y V) + 2 2:
for } s
k = 1
for
[ s.
2.
Error ounds for the n
For n >
MAGX,
the truncation error
in
yi,-V)
is
' 1
T N )= y - = p .
L..
PrPr+
1
r=N
(3)
see [2], eqs 5.01) and 5 .02 ).
This
error is bounded
by using
Lemma 2 of [I], which states that for
s ~ r
p
= p d p s ~ min (Pr+I/Pr, r + l ) / l x l + v r + l ) t / l
x
I2- l ) .
The program
sets
(4 )
where L =
max MAGX
+
1, NB -
1)
,
and
NSIG is
the
maximum number
of
sign ificant
decimal
digits in a double· precision variable on
the
computer
being
used. Then N' is the least
n
such that
fJlI
> TEST
I. For} s, N
is
the least
N'
su
ch
that
{JII > TEST = - 0 - . TEST
1
.
p,
- 1
(5)
In
conseque
nce
of 4) and 5),
the relative
truncation error I T(;;) I
Y
I is less than . lO
- NSJ ;
for all
n
in
the range MAGX <
n
L; see [1,
sec.
5]. For / s , N is taken to be N . Here a
glance
at I) shows
Pil i
P
- I > 2 for all
n
> MAGX, so the proof given in
[1,
sec. 5] for } s may also
be used
for [ s,
with
px repla
ced by 2 throughout.
In eq
1)
for
I s
2n
yIN)
and - SIGN· y N )
have the
same sign
since
if .x >
°
hen yIN) > 0 for
x
II 11+1 n
all n , and if x < 0, then
consecutive
~ ) S have
opposite
signs. Thus
relative
errors < E in Y ~ ~ I and
y \ ~ ) will pr
o
duce
a relative
error < E
in
Therefore, the
relative
truncation error
in all
/, ,(x),
o
x <
NB, is
bounded
by
1:
.
lO - NSJ ;.
2
For} I (x),
n MAGX,
the relative truncation
error
cannot
be
bounded, since
as = MAGX,
MAGX - 1, 1 in 1),
the
values} I (x)
oscillate,
and precision is lost owing to cancellation. In
this range
, JII(X) is accurate to
about
D
decimal places
,
where
D is the number
of decimals
in
J
MA(;X + 1 (x)
which
corresponds
to
NSIG
significant figures in
the same
quan
lity
[1, sec
. 5].
3. ormalization
and
Error ounds for
JA
The eqs 3)
were
chosen
to keep
cancellation under
contro
l. First,
1
I Jo x) 1 ~
I
J,,(x)
~ v 2
f o r n ~ l
(6)
126
8/20/2019 jresv77Bn3-4p125
http://slidepdf.com/reader/full/jresv77bn3-4p125 3/8
] , so eac h te rm of the sum
3)
for
J
s is less than
V2
tim
es
the wh ole sum. S
in ce
6) is a
ca n
ce ll
ation is even less than this would indicate .
For
I
s, can
ce
llation is avoided altogether, sin ce all terms in the sum
(3)
for
I
s have the
sa
me
as
shown in sec tion 2.
Bes
id
es bo
undin
g th e
trun
cation e
rror
of th e algo rithm, the program pr
ov id
es an estimated
und for th e truncation e
rror
of th e normalization sum , de fin
ed
by eqs (3). For j s, this e rror is
'
=
- y ~ N + L ( Y 2 k Y ~ Z » )
1
For
2k
MAGX
,
a bound for
th
e error term yW - Y
2k
is un available.
For
MA
GX
<
2k
<
N ,
\ '
k - Y2
k I
<
PaP,
- 1)
[1
,
s
ec
.
5].
To avoid storing all the PH',
the
program allows only
N
rm
s for which 2k ~
N
Here = and Y2k = /h k L l / PrPr +, ). Th erefore
1 1.
1 { 1
1
+-
2
/J 2 k + 1 Pu
sec tion 2 above. Now let
e n
P
2 x
R
(N)
~
L
- 1
k [ ' ; I]
I
Y2 k
I .
1
p
{
1 1 }
1+-? +-+ . , .
p
- 1) J \'+
1
p"" p t,
hk+ 1
7)
For
J
s the program se ts
TEST
1 ~ 2 . 10
NS1G
• The normaliza
ti
on factor fL is 1/1MACX (x) ,
sec.
5],
1
5 .1 ) 1 I h 1 0
,S IC
is is a ra th er wea k uppe r bound , a nd the e rror
--; ;
turns out to be ess t a n 2' I -. '.
For I s, PII /
P
_ I > 2
so
the analog of (7) is
R (N)
-< 8 .
~ 9p y cosh x
127
8/20/2019 jresv77Bn3-4p125
http://slidepdf.com/reader/full/jresv77bn3-4p125 4/8
this
is
derived by
substituting 2 for PN in (7), and
introducin
g
the
factor cosh x; see 3).
2·
10 -
NS
;
By setting TEST ~ exp(0.461 . MAGX) the
program
insures
that
Here, fL is -1 1 x), so the relative error
I
R N)/fL
I
s bounded by
MA
GX
I
R
(N)
I ,,; 4
IMAGx x)
exp(0.461 ·MAGX)
fL 9
cosh x .
lO
- NS (; .
Now Kapteyn s
inequality
[4,8.7] states that
lin nz)
I ,,; I
x p ~
I .
1
+ Z2
Ixl
.
Let
z = MAGX so for large x, z = 1, approximately.
Then
and
,,; I z
exp
IM A ;X.
1 ~
For
large
x,
the
approximate bound
for
M Gx x ) is
(
exp
V2
) MA(;X
1 + V2 < exp (0.533 . MAGX).
Substituting
this
in
(8), we obtain
I
N
I
<
4 .
exp
(0.533 MAGX) . exp (0.461 . MAGX)
fL 9
cosh
x
.
lO
-
NSI
.
<
. . lO
- NS G < 1 .
lO
-N
S«;
9 2
Besides this approximate upper bound,
the
strict
bounds
I
R .V) I
-;;- < 7.6 .
lO
-
NS
(;
Ixl
1
I
V )
I
<
0.565 . lO
- NS G
Ixl <
1
may
be derived
by using
Kapteyn s
inequality
to obtain a
strict
bound
for
IIMAGx+, x) I.
128
8)
8/20/2019 jresv77Bn3-4p125
http://slidepdf.com/reader/full/jresv77bn3-4p125 5/8
UOOU01
000002
000003
UOOUO"
0000U5
000006
OUU007
UaUO{Jf3
00U009
0000
10
0000
11
0000
12
OOUO
D
00n014
000015
0000
16
001101
7
000018
000019
000020
00002
1
000022
000023
U0 0024
00U025
0
00020
000027
00002
8
·
OU0 029
0000 30
00
0U3
1
OU UO
32
000Uj3
O O O O . 3 ~
0000:\;
000036
000U37
UOOU38
uooo
39
000040
U00041
00UU 2
0000 3
OU00414
0000 5
OOOU4b
000U 7
CDODtjl}
000
049
U D O O ~ 1
UOOO;1
U00052
0000;3
000054
4. Appendix: Algorithm
BESLRI
WELT
BESLR
1 '1.730222 .
sR730
C
C
C
C
C
5UBI{OIJTINE
uESLR
I IX, Nij , rZE , Q,NC ALC)
THIS
ROU TI NE CALCULA
T
ES
'IESSEL
FUNC
TI
ONS
I J
OF
REAL
ARGUMENT
~ N D
I NT
EGER ORDER
.
EXPlANITI
ON OF
VIRIAALES I N THE
C
LLI
NG
SEQUENCE
C x
C
DOUU LE PllEc rSION HEAL A R G U ~ E N T FOR WHICH I S OR J S
I .E
TO BE CllCUlATED . IF
1
5
ARE
TO RE COLCULATlJ .
O
S (X)
MUST BE LE SS
T
HON
EX
PARG (WH
I
CH SEE BE
L
Ow ).
I NT
EGER TY PE
. 1 + HI
GHES
T ORDER TO
BE CALCULA
T
CO
.
IT
MUS
T
BE
POS
IT I
VE.
C
C NO
C IZE
I NTeGER
TY
PE . ZERO I F J . s ARE TO BE·CILCUlATED . 1
IF 1.5 ARE TO BE
CALCULATE D.
C B
C
DOUDLE PREC
I S
IO
N
VEC
T
OR
OF lENG TH
NR
.
NE
ED
NO
T
HE
I
IH
TI ALllED BY USER .
IF
T
HE ROU
T
H)E
T
ERMHIA
T
ES
NORMAll
Y (
NC
AlC=
NR)
.
IT RETURNS
J(OR
l ~ R O
T
HflOUGH
J(OR
I - SUB
-
NB
- MI
NUS
-
ONE OF x
I N THIS
VE
CT
OR
.
C
C
C
NCAlC
I NTEGER
TY PE
.
NEED
BE I N
IT I AL
I ZED ny USER.
BEFORE US l
t\J
THE
RESULTS
, THE USEH SHOULD
CHECK
T ri
l
NCALC =
NO
.
I.
E.
~ l L O R D E ~ S
HAVE A E E ~
C A l . C U l ~
TO
T
HE DES
I RED
ACC URACY
. SEE
ERROR
RE TURIJS
R ~ L O .
C
C
C
EIPllNA TI
ON OF MACH
I
NE-DEPENDEN
T CONST'NTS
C
NS
I G
DEC IMAL S I GN I FI
CANCE DES
I RED .
SHOU
LD RE
SE
T
TO
I FIX ALOGlnC2) +rJQIT + . f HERE 'Jf1 IT IS
TH
E -IUr
1HEH OF
B
IT
S IN
TH
E
MANTISSA OF
A
DOURLE
PRECISION
V A I < I A U l ~
SETTING
NS
IG
lOWER WIll
RESULT
I N
nECREASED
A
CCUkACY
WdlLE
o;ETTHJG
NS
IG
HIGHER
WILL
I
NCREASE CPU e
WI
THOUT
I
NCREAS
I
NG
_CCURACY.
THE TRUNC
ATI
ON
ERWOR
IS LIN
ITED
TO T=. 5
+I
O
NSIG
FO
R J . S OF ORDER LESS
THAN
A P G U ~ f N AND
TO A
RELA
TIVE ERROR OF T FOR
r+
s A
Nn
T
H€
OTHER
J 5 .
f'JTE J LARGEST I NTEGER K SllCH
THAT
t o•• K I S MI\CHINE -
REPRE5DJTA LE
D O L I ~ L E
PRECISION .
LARGO UPPEH OI J T
HE M ~ G N
L J D E OF X. nEAR
IN
M I;U
THAT
IF ABSIX) =N. THEN AT
LEAST
N IT ERA TI
ONS OF THE
BACK ,A
RD
RECUR SI
ON
WI
LL BE
EXECU T
ED
.
EXPORG
L
ARGES
T
DOURlE PREC
I SI
ON ~ R G U M E N
THAT T
HE
LI
BR HY
DEXP ROUTI NE
CAN
H ' ~ D L E
ERROR U R ~ S
LET
G
nENOTE
EIT HER I
OR
J
I N
CASE OF AN ERROR
,
NCALC
.NE.NR ,
AN
D
ALL
G*S
ARE
C ~ L C U l A
TO THE
DESIRED
ACCURACY.
IF
IKALC .L l .
O.
N
ARGU" EN
T IS
OUT OF RANGE
.
NB
.
Ll
. O
OR I ZE IS NE IT
HER
0
NOR
J
OR
I
ZE=
l
ND
A n S I X ) E . r A k ~ .
IN THI S
CASE
. THE U- VECTOR I S NOT CALCUL
AT
ED . A
ND
NCALC
IS
SET
TO MI
NO
( N8 . 0
)-1 50 NCA
l C.NE .
NB
.
129
O()l)(]O 1 00
00U00200
001100300
UIlU004DO
00000500
00000600
OOU00700
Oll
UOUHOO
01l00U9UO
001)0 101)0
0000 11
00
OUU01200
00u013no
OU001400
OU
00 1
SUO
00U016UO
OUU0
1700
00U011l00
000019UO
OOU02UUO
00U02100
00U02200
00U 0230U
OUU02
l
l
00
OU00251 0
00u
0
2hUO
OuU027(10
OU002AOU
00CJ0210U
OUU0300U
00U03 1
(10
OUuOj20U
0000331)0
01 U034UO
Ouu03 oO
00003000
00003700
O J H ~
Ouu03< 00
OUU04000
01)0D41UO
OU004200
OUU0430U
OUu044tlO
Ouu045UO
4hOO
00u04700
OUfJn4BllO
00U04YOU
OOuOSI OO
U0005 1
UO
OUUOS200
00U053UO
00005400
8/20/2019 jresv77Bn3-4p125
http://slidepdf.com/reader/full/jresv77bn3-4p125 6/8
UULl(J5'l
5 ~ ,
U O l l J ~ 7
llU UO S
l
\
U O U O ~ Y
UU
LJ(16
0
UOJ fJ bl
(JU
OlJ62
UU OOh3
UO
:W bl+
(lOOGuS
UOI.
1U 6
0
UUOllb7
OU tH1GIJ
tJ
Ul,(jGq
OU
(1(
17U
UonU 71
UO
Ull 72
OuUJ
73
OU
l
I0 7
U U 7 ~
00 0076
U JllU
LtJu 0 7 :3
Uu
uU 79
Llu(
lfl HlJ
i)Uul U l
UU iJO H2
llOUOH3
uar)UHI.
UO,)O
O 1
uu nOtH ,
00l1U07
u OuOtH
Ll OUO Bg
LlU
()09()
iJUlJ09l
LlUUOY2
UO,}(iQ3
OOOU -)4
U()uOYo
OU(10 97
l J ( 1 I 1 U 9 ~
[jOuu9Q
(lOCI
I
Ol)
UOU l Ol
000 102
OOOIU}
001J 10 ...
U O ( )
Ouu
1116
OUlllU7
ou r)l
O,J
OOO I OY
OUt)
110
000
111
( j O O
N . GT. NCALC . GT.O wILL
OC
CUR
IF
~ ~ G X ~ N D
SU:3-N f3- 0F- X/ G - SUf3 - \1AGX - ( )F - X) • LT. l O. *. (NTF.N/?), I E . Nti
IS ~ U C ~ G R [ ~ THAN \1AGX . IN THIS CASE , R{NI IS CA L
CU
L ~ T E D
TO T
HE DES
IRE
D
ACCURACY
F
DR
N.LE .
NCALC
.
BU
T
FON
NCALC .L
T. N. LE.N . PRECISI ON
IS
L
OS
T. IF
N C A L C NU
A U S ( R ( ~ C A L C I /
I ) ) . E Q
~ . - ~ . THEN
OML Y T
H[
FIRST NSIG-K
SI G
N IFICA NT
FIGU
RES OF ~ ( ~ )
BE IF
T H ~ USER
WlSH£:S
TO ( , \LC ULATE R (NI T O HIGHER ACC:URr.CY, HE
SHOULD
USE
AN
/\Sy\1f>T
OTIC
Fl.W
1ULA FO R
LARGE ORDER
.
DOUdlE
PRECI S
IOn
1
T E ~ P A
T E ~ P 9
E M P C
X P A R G
O V E H ,
2 PLA S T, r OLD , rSAVE , PS AVEL
~ I \ 1 E
\ j S I O ~ J
[JOJB I
DATA
L A R G ~ X , E X P A R G / 1 3 0 7 , 1 0 0 0 0 0 7 . D 2 /
E M p r = D . \ ~ l S ( X )
~ A G ~ = l F I Y ( S N ~ E M P A ) )
IF GT . 0 . A tD . ·..,AGX . Lt: A ~ G E X AND . { 17E . EO . (l . OR.
E ~ P A E X P A R G ) ) GO TO 1
E H H 3 ~
R E T U f f ~ - - X.
N8
,
OR
I 1E IS
OU
T OF RANGE
N C A L ( ) - l
H . E T U Q ~ J
S I G,J = Dt iLE(FLOA T ( 1- 2 *I
lE
)
NC
ALC=N
:3
USE
2
-T l. ASCENnING
SERIES
FOR
X
IF(T
fViP
A.*
l
T
•• I 0 0 · . ~ J S I G }
GO
T O 30
INITI ALIZ
E
THE C U L A OF
POS
NRViX=iJR
- /llAG ;-t.
N= ·1AGX+ l
PLA,T=I . DO
r = :JJL[ (FLOAT(2*hl )
)/TE\1PA
CA L CU
LATE
E H A L
SIGNIFICANCE
TES T
TEsr=2. Df *I .
Jl
NSIG
IFII ZE . LO.
I.ftNO.2·.A
G
.GT.soNSIG)
TES T=OSQR TITES TO P)
E Q . 1 . A N ~ A G X . L E ~ S I G ) T E S T = T E S T / 8 S * *
ol =n
IF P>lf \'-1X . L l . j ) GO T O 4
C 0 L ~ T P *S u ~ T r N H - l . CHECK FOR POSSI BLE
O V E R F L O ~ .
TOV ER
= l. JI
• • (N T EN -
NSIG)
T A f n =
~ 1 A G X
N E N l J ~ J t i
DO 3 S T A R T N E N O
P
OLU
=rLAS T
PlI\S T=P
P : OR LE(FLOAT ( 2 *N) ) . PLA ST/TEMPA - SIGN*POLO
IF(P-
TOVER)
3 , 3 , 5
CONT I JUE
= ~ E I D
CALC U
LAT
E SP ECIA L SIGNIF I
CANCE
TEST FOR >lRMX.G T.
2.
~ A X 1 (
D S Q H T
T · l . I G ) · n S Q R
T ( 2 . D O ·
C
L
CU
L
ftTE
pos
UNTI
L SIGNIFICANCE
TE
ST
PASSES
4
i J =Nt
1
POLD =PL ST
r L I I ~ T : p
P=DllLE IFLOA T (2 0N )° LftST I TE MP - S IGN OPOLO
IF
P . LT . TESTl GO TO l
IFII7E
.
E0
ol . 0 R. M
EO ol) GO
TO 12
C
FOR JOS
• •
STRONG
V R I
N
T OF
THE
TE ST IS NECESSARY .
130
00005500
00005600
00005700
0()005800
00005900
00006000
00006100
0 ( ) 0 0 6 ~ 0 0
00006300
00006400
UOtl06500
00006hOO
00006700
OUQ06BOQ
OU006900
00u07000
ouun7
1
00
00007200
000073UO
OUU07/HID
OOU07S00
001107600
00007700
000071\00
00()07900
00008000
00008100
0000(\200
00008300
ouuOH400
00U08500
OU00860CJ
OU008700
000081\00
OOOOll900
00009000
OOUOgl[}O
OU009200
00009300
00009400
o u o o g ~ n o
00009600
00009700
00009000
00009900
000 1 0000
000 10100
000 1 0200
000 10300
000
10400
000105UO
000
1 0600
000 1 0700
00010800
00010900
00IJI1000
00011100
000 11 200
8/20/2019 jresv77Bn3-4p125
http://slidepdf.com/reader/full/jresv77bn3-4p125 7/8
OUO
113
00 0 11
OUlI II
UUl) 1 16
OUI)1
17
UUU
l I
S
0011
119
0
00
12U
00U I2 1
00 0
122
U0 0123
00
0 12'4
0 0U 12<;
00
UI 26
00U I27
00 0 128
OUUI29
OUOl30
ouu 13
1
OO U132
000133
00 0 134
000
000136
OOU
13?
UOOl38
00U139
OOUl U
O
OU
I l
U
00
142
00 0 143
O O U 1 4 ' ~
0 0 0 1 ~
OUOI
6
OO UI47
OOO I S
OUO I
9
UUUI
50
00
0 1 , 1
0
00
1 ,2
00
0 153
UU0154
00U I
55
O
OD
l
Sh
0 0U I
57
0 011 160
Oll(l l e l
0
00
162
01.lIl163
QO C) if) l,
00 (1 1(':'
00U
166
000167
00 0 1
61l
00 0
109
00
0
17
0
CA
LCU
LA
TE IT .
AND CALCULATE
poS
UN
TI L THIS T
EST IS P A S S ~ 0
'.
\:
1
~ P l = P / P L A S T
T E ~ P C
=OIILE
F
LOA T N+ 1 ) ) TE\1PA
T E ~ p ~ / T E ~ P B . G T . 2 0 0 * T E \ 1 P C ) T E ~ P R T E \ 1 P
D ~ Q H
1 TE
MPC
2 - 1 .
nO )
TEST=TEST/OS QRTITE
MPB
- I .
OO/TEMPOI
IF ( P-T ESTl 4r l 2d2
TO AVO
I U
OVEPF
LOW . DIVI DE poS
BY
TOVER .
CALCULA
TE
UN
TIL
AO
S IPI . GT'}.
5 TOVER = l. Ql* . NTE N
P=P/TOvER
PLAS T=PLAST/TOVER
PSAV;:
=P
PSAV
EL=
PLAS
T
NSTART=N+l
6
= ~ J +
1
POLO
=PL
AS
T
PLAST
=P
O ~ L E I F L O A T I 2 0 I I ' P L A S T / T E M P A - S I G N o P O L O
IFt P. LE . l . DO) GO TO n
E M P ~ O A T I 2 N I I /
IFllZE .
EO '}1 GO
TO
H
E M P ~
P ~ = P l n S T / r O L D
IFI TF P'
1 •DO
IT EMPli. GT. 2. 00* T
EMPC
I
TE PR=TEMPC+DSQRT
1
(TE l
PC ' · 2 - 1 . [) O)
CALC
ULnT E
BACKWARD
TES T, A
ND
FINO NeAle , THE
HTGHE
ST N
SUCH
TII AT T
HE
TE
ST
I S
PASSED
.
8 TE5 T=.500 +POLO *PL AS
r:t(1. OO
- 1 . OO / T
E\1PB **2) / l .
n l .*
NS
I G
p: PLflS
r+r
O
VE
R
N=N- l
NEND :: I I I N(1 ( Nl J , N J
DO Nc nLC =NS TA
RT
,
NEND
POLO =
PSAVEL
P ~ A V E L P S A V E
PSt . VE =OULE F LOA T 2 . r
J)
) " PSAVEL/ TEMPI\- S I r;I\J*POLD
IFI
PS AV
E.
PS AVEL
-T
ES
TI
9 . 9
01
0
9 COf4T I
I\J\)
E
C A L C = N E ~
10 'IOLC=NCALC - I
TH E SU
V
1 } 2 H ( 3 ) + 2 B ( • IS USED TO NORMAL I ZE . M fHI:..
COEFF ICieNT OF H(N I . I S I NITIALIZED TO 2 OR O.
12
rJ=N t-t
'1
=2 ·
'J
- 4
·
f'J/21
INITI
ALI ZE
T
HE UO CKWOR
D
RECURS
I
ON
A
ND
T
HE NORMAL
I Z
ATION
TE "1PA= 1 • Q
O/P
SU I::
[) f lL E (FLOI I T L VII
)
.T E 1PA
NF ',J D::tj-
J\
JB
I F
I
II
E
rJ;» 17. 15 ,
1:3
l f ~ n
,\ CK
wl'l RO VIA DIFFERE
NCE EO
UATION . CA L
CU
LATING
(
ou
r
NO
T ST
OR
I
NG
) HI NI .
UN
TIL
N=NR
.
1 3
00
14 L=
I. NEND
N=r ,J
l
C = T E M P
TE' ,P B=T EMPA
131
01
1
0 11 3 0 0
OUU I1 4
0U
00
11
50
0
0 00 11 0uO
00 0
11 700
OU0 11 1..\00
000
11
0 0
00
0 1
2000
0 0 0 1 2 1 0 0
OL
U1 22 UO
0
00
1;?j
OO
0 00 1240U
OU
0 12 :' 0 0
DU O
12 6 00
OOOl 2 7 il O
0 00 12(\OU
00012 90
U
00
0
13
0
00
Ou u
l3 1
0 0
OUU 13
2UO
OU 0 13 300
0 00 13
l
t (J O
1 3 ~ 1 1 0
OOU13()OO
Quu l
Ji
u o
OOo
1
3HUO
OU0 13
9U
O
o00140no
OOu1
41
UO
OLJo
t 4
2Q
O
OU0
14 3
0Q
OU0
14 4
00
OOu 14:, OU
0
00
1
4600
OnO
I 7 00
O
Ou
14
/IOU
OOO
l' t
t)O O
00u l 5UoO
o u o l
o l
r
,O
0011 10 200
n OI)
OO J IC)4 (JO
O
U0
1
5500
~ ( l O O
Ou
Ot
57 )
O
OOO J o Un O
OU\l l
00
u l
60 0
0
UllU 161
IJU
OUO l h 2u O
OU U16jOO
OUII1 6
1
111
U
OUU l o0 0 U
000l67 1 U
000J6110 0
OOU
16 g
00
OUO l7
0
00
8/20/2019 jresv77Bn3-4p125
http://slidepdf.com/reader/full/jresv77bn3-4p125 8/8
OUU171
OUUI7<
00J 17 3
u i d 174
LlO1J
17 J
UlJ0
17
h
\.JUlIl 7 7
au o1 7 1J
OO[)17g
UOtllen
II Ulll/ ;1
II 01) 1 ~ 2
J l t }
UU tJ UJ 4
U
Ull
l 3'J
U
U,1
1 Mh
U IJlI l fJ 7
U(Jl)
l
o
uUIl I
B9
iJ UI) 190
OUu19 1
OUI)
1
<)?
UUIl I YJ
000194
U l ~ 1
19S
OUll196
UU (
. lC)7
U O i J 1 9 ~ ~
UUl)199
U l lu20 0
OJu2L1 1
lJOU.2U2
OOu2U 3
o ut l? O .
0 00
;' 0
'.)
UU \12 lt)
UU ll2U 7
Qo e
20t\
) ~ U Y
001)2 1 0
uun21 1
uUJ.21 2
lJUtl2 1 j
OOU2 14
U U 1 1 2
OU l'2 1 b
0002 1 7
UUiJ? l d
OUu2 1
u
DU,J220
00
U2 21
0 0
02
2 2
3 .
E . r A
I D B L r I
L o . T
) ' T E X - S J ' T E ~ P C
'<1 =2-1,1
14 S U ' ~ = S U M O B L E ( F ) I * T
STORE
y ( " j l ~
1 5 ~ J l = T E ~ r
T . l l (,0
TO
16
t Jq= t .
SPJCE
2
..
T E lPA
WAS
f\ODED TO THE SU ,
TF
MPA MU S T 5t:
C SUBTRflCTFn
SUI.1=C, ll'4 -TU·\Pfl.
GO
TO 23
CA:""CtILl\ r r:
f\.
...jD STORE
B(NU
- l l
t 6 \1='-:-
t
r - . . ) ) = ( W ~ "'T E;...,P A) / X-S I Gt...l *T F.:,-,pq
IF( :L [Q . lI GO TO 22
=2-
v
,
S U ~ = 5 U \ 1 M ) ) .
GO
T0 1 9
· L T .
SO
S T O R
O(N)
AND
SE
T HI GH
ER
OROERS
TO
Z
ERO
17 U<NJ
:: TE 'P A
N[rJ.J::
- :\I[ND
JO 1 A L
= l
,
) ,( ' /0
l R n( 'PL): :O .
un
19 I ~ = : J - ?
TFliJ:: rJ D. f t"L U)
GO
TO 2 1
CAL CILf l fE VIfl
D I ~ F E n E
EQU ATIO N A
ND
ST OR E B (N) ,
lI ·JT l L
'
J::?
DO 20 L= l
, NE'ID
' J= J - 1
1
( J ) : : (DflL:::
(FLOAT
) * R ( N+l) ) 5 1
GN
*n 0.
J+2)
1 =
; >-
.,
20
S U ~ = S U V D ~ L E ( F L O A
C CAL::ULAT E de l )
2 1
Uf
lJ
=?OO
.
[ l
( ? 1
/X-S
I G tl *
i1 (3
J
2 2 SU\1 = SU\1 i n( 1)
O R ~ A Z F - - I IZ
E=I. D
IV
lOE
SLIM BY
COSHln. DIVI
DE ALL
[J
n y
SUV1 .
23 IF II
7E
.
EQ
. U) GO TO 25
TE" Pft=OE I P IDftSSI X))
S U \ 1 = 2 S U ~ / 0 0 / T M P A l
2')
00 2(,
-1 =1 ' ~ H
26
Q(II) :: i l {NI /SU\1
F<Elu ... U
T
WO-
T
ERV1
ASCENU I NG SER I ES FOR SMALL X
3 0 TE '1pl\= 1. no
r E v p n =
D O · X .
( t ) :: 1 • On TE '}PR
II="(,J ;
.E J
. l l GO TO
32
')0 3 1 ~ J l 1
T E V ) A = T [ ~ P A
X / O ~ L [ ( ~
31
~ ( ~ ) T E . P A E ~ P A
L E I F ) ) )
32
RETURN
[r ID
END CUR LCC 11
02
- 0038 L8
S. References
00 0
17100
D00 17 20 0
OUO
I7 3
00
Q00 17 4 00
00 0
17
S00
001l
17
60U
OOU 17 7 00
00 0 1 7HOO
00 0 179UO
Don
1
uooo
OOOIAIOO
OUolB200
OOU18300
OO()lHI,OO
00tllR500
00010hOO
00U 18700
OOUltillOO
00018
0
00
OUU l 9000
OU0 19 100
OUu 192fJO
00 0 19300
00 0
19QOO
00 0
1
9500
OUlJ1 9hOO
00019700
00 0 19000
00U 199 0 0
00020000
OU020 1
0D
00020200
OOLl203 ()O
OUu2 0 4 0 0
0
00
2 0SIlD
D
0020(lO
a
0 00 2
f)
700
0 0020000
D002 0'lOD
0002
1DOO
D002
1100
0002 1
200
D002 D uO
0
002
14 00
0
002
1
S0(
OOu2 1hOO
D002
17 00
0002lUO O
0002 1
900
0 002200 0
OU0221 00
0 00 22 2 0 U
[11
Olver, F. W. J . and
Sookne
, D ./.. A note on
ba
ckward
recurrence
algorithm
s,
Mathema
ti
cs
of
Computation. Vo
l. 26,
No.
120 (O
c
t. 1972).
pp.
941 - 947.
[2J Olver. F. W. J..
Numer
ical solu
ti
on of second-order linear difference eq uations.
J. Re
s. Nat. Bur. Stand. (U .S.). 71B,
(Math. and Math. Phys .). Nos 2&3. 111 - 129 (Apr.- Se p
t.
1967).
[3] British Assoc. f
or
the Advancement
of
Sc ien ce. Bes se l Functions - Part ll . Mathematical Tables. Vol. lO
(C
am bridge
Un iv er s
it
y Press, Cambridge, 1952).
[4] Watson. C. N .. A
Tr
e
atis
e on the Th eory of Bessel Func
tions
(Second Edition.
Camhrid
ge Univers
il
y
Pr
ess, Cambrid ge,
1944
).
(
Paper
77B3&4-387)
132