besk1e.f
4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
function besk1e (x)
c july 1980 version. w. fullerton, c3, los alamos scientific lab.
dimension bk1cs(11), ak1cs(17), ak12cs(14)
external besi1, csevl, inits, r1mach
c
c series for bk1 on the interval 0. to 4.00000d+00
c with weighted error 7.02e-18
c log weighted error 17.15
c significant figures required 16.73
c decimal places required 17.67
c
data bk1 cs( 1) / .0253002273 389477705e0 /
data bk1 cs( 2) / -.3531559607 76544876e0 /
data bk1 cs( 3) / -.1226111808 22657148e0 /
data bk1 cs( 4) / -.0069757238 596398643e0 /
data bk1 cs( 5) / -.0001730288 957513052e0 /
data bk1 cs( 6) / -.0000024334 061415659e0 /
data bk1 cs( 7) / -.0000000221 338763073e0 /
data bk1 cs( 8) / -.0000000001 411488392e0 /
data bk1 cs( 9) / -.0000000000 006666901e0 /
data bk1 cs(10) / -.0000000000 000024274e0 /
data bk1 cs(11) / -.0000000000 000000070e0 /
c
c series for ak1 on the interval 1.25000d-01 to 5.00000d-01
c with weighted error 6.06e-17
c log weighted error 16.22
c significant figures required 15.41
c decimal places required 16.83
c
data ak1 cs( 1) / .2744313406 973883e0 /
data ak1 cs( 2) / .0757198995 3199368e0 /
data ak1 cs( 3) / -.0014410515 5647540e0 /
data ak1 cs( 4) / .0000665011 6955125e0 /
data ak1 cs( 5) / -.0000043699 8470952e0 /
data ak1 cs( 6) / .0000003540 2774997e0 /
data ak1 cs( 7) / -.0000000331 1163779e0 /
data ak1 cs( 8) / .0000000034 4597758e0 /
data ak1 cs( 9) / -.0000000003 8989323e0 /
data ak1 cs(10) / .0000000000 4720819e0 /
data ak1 cs(11) / -.0000000000 0604783e0 /
data ak1 cs(12) / .0000000000 0081284e0 /
data ak1 cs(13) / -.0000000000 0011386e0 /
data ak1 cs(14) / .0000000000 0001654e0 /
data ak1 cs(15) / -.0000000000 0000248e0 /
data ak1 cs(16) / .0000000000 0000038e0 /
data ak1 cs(17) / -.0000000000 0000006e0 /
c
c series for ak12 on the interval 0. to 1.25000d-01
c with weighted error 2.58e-17
c log weighted error 16.59
c significant figures required 15.22
c decimal places required 17.16
c
data ak12cs( 1) / .0637930834 3739001e0 /
data ak12cs( 2) / .0283288781 3049721e0 /
data ak12cs( 3) / -.0002475370 6739052e0 /
data ak12cs( 4) / .0000057719 7245160e0 /
data ak12cs( 5) / -.0000002068 9392195e0 /
data ak12cs( 6) / .0000000097 3998344e0 /
data ak12cs( 7) / -.0000000005 5853361e0 /
data ak12cs( 8) / .0000000000 3732996e0 /
data ak12cs( 9) / -.0000000000 0282505e0 /
data ak12cs(10) / .0000000000 0023720e0 /
data ak12cs(11) / -.0000000000 0002176e0 /
data ak12cs(12) / .0000000000 0000215e0 /
data ak12cs(13) / -.0000000000 0000022e0 /
data ak12cs(14) / .0000000000 0000002e0 /
c
data ntk1, ntak1, ntak12, xmin, xsml / 3*0, 2*0. /
c
if (ntk1.ne.0) go to 10
ntk1 = inits (bk1cs, 11, 0.1*r1mach(3))
ntak1 = inits (ak1cs, 17, 0.1*r1mach(3))
ntak12 = inits (ak12cs, 14, 0.1*r1mach(3))
c
xmin = exp (amax1(alog(r1mach(1)), -alog(r1mach(2))) + .01)
xsml = sqrt (4.0*r1mach(3))
c
10 if (x.le.0.) call seteru (29hbesk1e x is zero or negative, 29,
1 1, 2)
if (x.gt.2.0) go to 20
c
if (x.lt.xmin) call seteru (31hbesk1e x so small k1 overflows,
1 31, 2, 2)
y = 0.
if (x.gt.xsml) y = x*x
besk1e = exp(x) * (alog(0.5*x)*besi1(x) +
1 (0.75 + csevl (.5*y-1., bk1cs, ntk1))/x )
return
c
20 if (x.le.8.) besk1e = (1.25 + csevl ((16./x-5.)/3., ak1cs, ntak1))
1 / sqrt(x)
if (x.gt.8.) besk1e = (1.25 + csevl (16./x-1., ak12cs, ntak12))
1 / sqrt(x)
c
return
end