forked from johannesgerer/jburkardt-f
-
Notifications
You must be signed in to change notification settings - Fork 1
/
specfun.html
534 lines (493 loc) · 15.7 KB
/
specfun.html
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
<html>
<head>
<title>
SPECFUN - Special Function Evaluation
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
SPECFUN <br> Special Function Evaluation
</h1>
<hr>
<p>
<b>SPECFUN</b>
is a FORTRAN90 library which
evaluates certain special functions,
by William Cody and Laura Stoltz.
</p>
<p>
In particular, <b>SPECFUN</b> can evaluate the I, J, K and Y
Bessel functions, of orders 0, 1, or arbitrary positive integer
order N, or for any positive non-integer order (an unusual
feature).
</p>
<p>
Routines are also available for the Gamma function, exponential
integrals, the error function, the Psi function, and Dawson's integral.
</p>
<p>
The original, true, correct (FORTRAN77) version of SPECFUN
is available through NETLIB:
<a href = "http://www.netlib.org/specfun/index.html">
http://www.netlib.org/specfun/index.html"</a>.
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>SPECFUN</b> is available in
<a href = "../../f77_src/specfun/specfun.html">a FORTRAN77 version</a> and
<a href = "../../f_src/specfun/specfun.html">a FORTRAN90 version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../f_src/cordic/cordic.html">
CORDIC</a>,
a FORTRAN90 library which
use the CORDIC method to compute certain elementary functions.
</p>
<p>
<a href = "../../f_src/fn/fn.html">
FN</a>,
a FORTRAN90 library which
evaluates elementary and special functions,
by Wayne Fullerton.
</p>
<p>
<a href = "../../f_src/g95_intrinsics/g95_intrinsics.html">
G95_INTRINSICS</a>,
FORTRAN90 programs which
demonstrate the use of intrinsic functions peculiar
to the G95 FORTRAN compiler, which include Bessel J and Y functions,
ERF and GAMMA.
</p>
<p>
<a href = "../../cpp_src/gsl/gsl.html">
GSL</a>,
a C++ library which
evaluates many special functions.
</p>
<p>
<a href = "../../f_src/machar/machar.html">
MACHAR</a>,
a FORTRAN90 library which
is used to compute machine arithmetic parameters.
</p>
<p>
<a href = "../../f_src/polpak/polpak.html">
POLPAK</a>,
a FORTRAN90 library which
evaluates certain mathematical functions, especially some
recursive polynomial families.
</p>
<p>
<a href = "../../f_src/slatec/slatec.html">
SLATEC</a>,
a FORTRAN90 library which
evaluates many special functions.
</p>
<p>
<a href = "../../f_src/special_functions/special_functions.html">
SPECIAL_FUNCTIONS</a>,
a FORTRAN90 library which
computes the Beta, Error, Gamma, Lambda, Psi functions,
the Airy, Bessel I, J, K and Y, Hankel, Jacobian elliptic, Kelvin, Mathieu,
Struve functions,
spheroidal angular functions, parabolic cylinder functions,
hypergeometric functions,
the Bernoulli and Euler numbers,
the Hermite, Laguerre and Legendre polynomials,
the cosine, elliptic, exponential, Fresnel and sine integrals,
by Shanjie Zhang, Jianming Jin;
</p>
<p>
<a href = "../../f_src/test_values/test_values.html">
TEST_VALUES</a>,
a FORTRAN90 library which
contains a few test values of many functions.
</p>
<p>
<a href = "../../f77_src/toms644/toms644.html">
TOMS644</a>,
a FORTRAN77 library which
evaluates the Bessel I, J, K, Y functions, the Airy functions Ai and Bi,
and the Hankel function, for complex argument and real order.
</p>
<h3 align = "center">
Author:
</h3>
<p>
The original FORTRAN77 version is by William Cody and Laura Stoltz.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Donald Amos,<br>
Computation of Modified Bessel Functions and Their Ratios,<br>
Mathematics of Computation,<br>
Volume 28, Number 24, January 1974.
</li>
<li>
John Campbell,<br>
On Temme's Algorithm for the Modified Bessel Functions of the
Third Kind,<br>
ACM Transactions on Mathematical Software,<br>
Volume 6, Number 4, December 1980, pages 581-586.
</li>
<li>
John Campbell,<br>
Bessel functions J_nu(x) and Y_nu(x) of real order and real
argument,<br>
Computational Physics Communications,<br>
Volume 18, 1979, pages 133-142.
</li>
<li>
William Cody,<br>
An Overview of Software Development for Special Functions,
in Numerical Analysis Dundee, 1975, <br>
edited by GA Watson,<br>
Lecture Notes in Mathematics, 506, <br>
Springer, 1976,<br>
LC: QA3.L28.v506.
</li>
<li>
William Cody,<br>
Rational Chebyshev Approximations for the Error Function,<br>
Mathematics of Computation,<br>
Volume 23, Number 107, July 1969, pages 631-638.
</li>
<li>
William Cody,<br>
Algorithm 597:
Sequence of Modified Bessel Functions of the First Kind,<br>
ACM Transactions of Mathematical Software,<br>
Volume 9, Number 2, June 1983, pages 242-245.
</li>
<li>
William Cody,<br>
Algorithm 665:
MACHAR, a subroutine to dynamically determine
machine parameters,<br>
ACM Transactions on Mathematical Software,<br>
Volume 14, Number 4, December 1988, pages 303-311.
</li>
<li>
William Cody,<br>
Algorithm 715:
SPECFUN - A Portable FORTRAN Package of
Special Function Routines and Test Drivers,<br>
ACM Transactions on Mathematical Software,<br>
Volume 19, Number 1, March 1993, pages 22-32.
</li>
<li>
William Cody,<br>
Performance evaluation of programs for the error and
complementary error functions,<br>
ACM Transactions on Mathematical Software,<br>
Volume 16, Number 1, March 1990, pages 29-37.
</li>
<li>
William Cody,<br>
Performance evaluation of programs related to the real gamma function,<br>
ACM Transactions on Mathematical Software,<br>
Volume 17, Number 1, March 1991, pages 46-54.
</li>
<li>
William Cody, Kenneth Hillstrom,<br>
Chebyshev Approximations for the Natural Logarithm of the
Gamma Function,
Mathematics of Computation,<br>
Volume 21, Number 98, April 1967, pages 198-203.
</li>
<li>
William Cody, Kathleen Paciorek, Henry Thacher,<br>
Chebyshev Approximations for Dawson's Integral,<br>
Mathematics of Computation,<br>
Volume 24, Number 109, January 1970, pages 171-178.
</li>
<li>
William Cody, Laura Stoltz,<br>
Performance evaluation of programs for certain Bessel functions,<br>
ACM Transactions on Mathematical Software,<br>
Volume 15, Number 1, March 1989, pages 41-48.
</li>
<li>
William Cody, Laura Stoltz,<br>
The Use of Taylor series to test accuracy of function programs,<br>
ACM Transactions on Mathematical Software,<br>
Volume 17, Number 1, March 1991, pages 55-63.
</li>
<li>
William Cody, Anthony Strecok, Henry Thacher,<br>
Chebyshev Approximations for the Psi Function,<br>
Mathematics of Computation,<br>
Volume 27, Number 121, January 1973, pages 123-127.
</li>
<li>
William Cody, Henry Thacher,<br>
Rational Chebyshev Approximations for the Exponential
Integral E1(x),<br>
Mathematics of Computation,<br>
Volume 22, Number 103, July 1968, pages 641-649.
</li>
<li>
William Cody, Henry Thacher,<br>
Chebyshev Approximations for the Exponential
Integral Ei(x),<br>
Mathematics of Computation,<br>
Volume 23, Number 106, April 1969, pages 289-303.
</li>
<li>
William Cody, William Waite,<br>
Software Manual for the Elementary Functions,<br>
Prentice Hall, 1980,<br>
ISBN: 0138220646,<br>
LC: QA331.C635.
</li>
<li>
Walter Gautschi,<br>
Algorithm 282:
Derivatives of EXP(X)/X, COS(X)/X, and SIN(X)/X,<br>
Communications of the ACM,<br>
Volume 9, April 1966, page 272.
</li>
<li>
John Hart, Ward Cheney, Charles Lawson, Hans Maehly,
Charles Mesztenyi, John Rice, Henry Thatcher,
Christoph Witzgall,<br>
Computer Approximations,<br>
Wiley, 1968,<br>
LC: QA297.C64.
</li>
<li>
Michael Malcolm,<br>
Algorithms to Reveal Properties of Floating Point Arithmetic,<br>
Communications of the ACM,<br>
Volume 15, Number 11, November 1972, pages 949-951.
</li>
<li>
Frank Olver, David Sookne,<br>
A Note on Backward Recurrence Algorithms,<br>
Mathematics of Computation,<br>
Volume 26, 1972, pages 941-947.
</li>
<li>
Malcolm Pike, David Hill,<br>
Algorithm 266:
Pseudo-Random Numbers,<br>
Communications of the ACM,<br>
Volume 8, Number 10, October 1965, page 605.
</li>
<li>
David Sookne,<br>
Bessel Functions of Real Argument and Integer Order,<br>
NBS Journal of Research B,<br>
Volume 77B, 1973, pages 125-132.
</li>
<li>
Nico Temme,<br>
On the numerical evaluation of the ordinary Bessel function
of the second kind,<br>
Journal of Computational Physics,<br>
Volume 21, 1976, pages 343-350.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "specfun.f90">specfun.f90</a>, the source code.
</li>
<li>
<a href = "specfun.sh">specfun.sh</a>,
commands to compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<b>SPECFUN_PRB1</b> makes some sophisticated accuracy checks.
<ul>
<li>
<a href = "specfun_prb1.f90">specfun_prb1.f90</a>,
a sample calling program.
</li>
<li>
<a href = "specfun_prb1.sh">specfun_prb1.sh</a>,
commands to compile and run the sample program.
</li>
<li>
<a href = "specfun_prb1_output.txt">specfun_prb1_output.txt</a>,
the output file.
</li>
</ul>
</p>
<p>
<b>SPECFUN_PRB2</b> compares computed results to tables of
values extracted from the program library <b>TEST_VALUES</b>.
<ul>
<li>
<a href = "specfun_prb2.f90">specfun_prb2.f90</a>,
a sample calling program.
</li>
<li>
<a href = "specfun_prb2.sh">specfun_prb2.sh</a>,
commands to compile and run the sample program.
</li>
<li>
<a href = "specfun_prb2_output.txt">specfun_prb2_output.txt</a>,
the output file.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>BESEI0</b> evaluates the exponentially scaled Bessel I0(X) function.
</li>
<li>
<b>BESEI1</b> evaluates the exponentially scaled Bessel I1(X) function.
</li>
<li>
<b>BESEK0</b> evaluates the exponentially scaled Bessel K0(X) function.
</li>
<li>
<b>BESEK1</b> evaluates the exponentially scaled Bessel K1(X) function.
</li>
<li>
<b>BESI0</b> evaluates the Bessel I0(X) function.
</li>
<li>
<b>BESI1</b> evaluates the Bessel I1(X) function.
</li>
<li>
<b>BESJ0</b> evaluates the Bessel J0(X) function.
</li>
<li>
<b>BESJ1</b> evaluates the Bessel J1(X) function.
</li>
<li>
<b>BESK0</b> evaluates the Bessel K0(X) function.
</li>
<li>
<b>BESK1</b> evaluates the Bessel K1(X) function.
</li>
<li>
<b>BESY0</b> evaluates the Bessel Y0(X) function.
</li>
<li>
<b>BESY1</b> evaluates the Bessel Y1(X) function.
</li>
<li>
<b>CALCEI</b> computes various exponential integrals.
</li>
<li>
<b>CALCI0</b> computes various I0 Bessel functions.
</li>
<li>
<b>CALCI1</b> computes various I1 Bessel functions.
</li>
<li>
<b>CALCK0</b> computes various K0 Bessel functions.
</li>
<li>
<b>CALCK1</b> computes various K1 Bessel functions.
</li>
<li>
<b>CALERF</b> computes various forms of the error function.
</li>
<li>
<b>CALJY0</b> computes various J0 and Y0 Bessel functions.
</li>
<li>
<b>CALJY1</b> computes various J1 and Y1 Bessel functions.
</li>
<li>
<b>DAW</b> evaluates Dawson's integral function.
</li>
<li>
<b>DLGAMA</b> evaluates log ( Gamma ( X ) ) for a real argument.
</li>
<li>
<b>DSUBN</b> evaluates derivatives of Ei(X).
</li>
<li>
<b>EI</b> evaluates the exponential integral Ei(X).
</li>
<li>
<b>EONE</b> evaluates the exponential integral E1(X).
</li>
<li>
<b>EXPEI</b> evaluates the scaled exponential integral exp(-X) * Ei(X).
</li>
<li>
<b>MACHAR</b> determines various machine arithmetic parameters.
</li>
<li>
<b>R8_ERF</b> evaluates the error function.
</li>
<li>
<b>R8_ERFC</b> evaluates the complementary error function.
</li>
<li>
<b>R8_ERFCX</b> evaluates the exponentially scaled complementary error function.
</li>
<li>
<b>R8_GAMMA</b> evaluates Gamma(X) for a real argument.
</li>
<li>
<b>R8_PSI</b> evaluates the function Psi(X).
</li>
<li>
<b>REN</b> is a random number generator.
</li>
<li>
<b>RIBESL</b> calculates I Bessel function with non-integer orders.
</li>
<li>
<b>RJBESL</b> calculates J Bessel function with non-integer orders.
</li>
<li>
<b>RKBESL</b> calculates K Bessel function with non-integer orders.
</li>
<li>
<b>RYBESL</b> calculates Y Bessel function with non-integer orders.
</li>
<li>
<b>TIMESTAMP</b> prints out the current YMDHMS date as a timestamp.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../f_src.html">
the FORTRAN90 source codes</a>.
</p>
<hr>
<i>
Last revised on 23 January 2008.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>