-
Notifications
You must be signed in to change notification settings - Fork 3
/
readme-meix.for
executable file
·516 lines (343 loc) · 17 KB
/
readme-meix.for
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
****************************************
* DISK TO ACCOMPANY *
* COMPUTATION OF SPECIAL FUNCTIONS *
* *
* Shanjie Zhang and Jianming Jin *
* *
* Copyright 1996 by John Wiley & *
* Sons, Inc. *
* *
****************************************
I. INTRODUCTION
As stated in the preface of our book "Computation of Special
Functions," the purpose of this book is to share with the reader
a set of computer programs (130 in total) which we have developed
during the past several years for computing a variety of special
mathematical functions. For your convenience, we attach to the
book this diskette that contains all the computer programs
listed or mentioned in the book.
In this diskette, we place all the programs under directory
SMF\PROGRAMS. In order to illustrate the use of these programs
and facilitate your testing of the programs, we wrote a short
simple main program for each program so that you can readily test
them.
All the programs are written in FORTRAN-77 and tested on PCs
and workstations. Therefore, they should run on any computer with
implementation of the FORTRAN-77 standard.
Although we have made a great effort to test these programs,
we would not be surprised to find some errors in them. We would
appreciate it if you can bring to our attention any errors you find.
You can do this by either writing us directly at the location
(e-mail: j-jin1@uiuc.edu) or writing to the publisher, whose address
appears on the back cover of the book. However, we must note that
all these programs are sold "as is," and we cannot guarantee to
correct the errors reported by readers on any fixed schedule.
All the programs and subroutines contained in this diskette
are copyrighted. However, we give permission to the reader who
purchases this book to incorporate any of these programs into his
or her programs provided that the copyright is acknowledged.
Regarding the specifics of the programs, we want to make the
following two points.
1) All the programs are written in double precision. Although
the use of double precision is necessary for some programs,
especially for those based on series expansions, it is not
necessary for all programs. For example, the computation of
of special functions based on polynomial approximations does
not have to use double precision. We chose to write all the
programs using double precision in order to avoid possible
confusion which may occur in using these programs. If
necessary, you can convert the programs into the single
precision format easily. However, doing so for some
programs may lead to a lower accuracy.
2) In the main programs that calculate a sequence of special
functions, we usually set the maximum order or degree to 100
or 250. However, this is not a limit. To compute functions
with a higher order or degree, all you need to do is simply
set the dimension of proper arrays higher.
II. DISCLAIMER OF WARRANTY
Although we have made a great effort to test and validate the
computer programs, we make no warranties, express or implied, that
these programs are free of error, or are consistent with any
particular standard of merchantability, or that they will meet
your requirements for any particular application. They should not
be relied on for solving problems whose incorrect solution could
result in injury to a person or loss of property. If you do use
the programs in such a manner, it is at your own risk. The authors
and publisher disclaim all liability for direct or consequential
damages resulting from your use of the programs.
III. LIST OF PROGRAMS
(Please note that all file names of programs installed from the disk
begin with an M, for example, MBERNOA.FOR)
BERNOA Evaluate a sequence of Bernoulli numbers (method 1).
BERNOB Evaluate a sequence of Bernoulli numbers (method 2).
EULERA Evaluate a sequence of Euler numbers (method 1).
EULERB Evaluate a sequence of Euler numbers (method 2).
*****
OTHPL Evaluate a sequence of orthogonal polynomials and their
derivatives, including Chebyshev, Laguerre, and Hermite
polynomials.
LEGZO Evaluate the nodes and weights for Gauss-Legendre quadrature.
LAGZO Evaluate the nodes and weights for Gauss-Laguerre quadrature.
HERZO Evaluate the nodes and weights for Gauss-Hermite quadrature.
*****
GAMMA Evaluate the gamma function.
LGAMA Evaluate the gamma function or the logarithm of the gamma
function.
CGAMA Evaluate the gamma function with a complex argument.
BETA Evaluate the beta function.
PSI Evaluate the psi function.
CPSI Evaluate the psi function with a complex argument.
INCOG Evaluate the incomplete gamma function.
INCOB Evaluate the incomplete beta function.
*****
LPN Evaluate a sequence of Legendre polynomials and their
derivatives with real arguments.
CLPN Evaluate a sequence of Legendre polynomials and their
derivatives with complex arguments.
LPNI Evaluate a sequence of Legendre polynomials, their
derivatives, and their integrals.
LQNA Evaluate a sequence of Legendre functions of the second
kind and their derivatives with restricted real arguments.
LQNB Evaluate a sequence of Legendre functions of the second
kind and their derivatives with nonrestricted real arguments.
CLQN Evaluate a sequence of Legendre functions of the second
kind and their derivatives with complex arguments.
LPMN Evaluate a sequence of associated Legendre polynomials and
their derivatives with real arguments.
CLPMN Evaluate a sequence of associated Legendre polynomials and
their derivatives with complex arguments.
LQMN Evaluate a sequence of associated Legendre functions of the
second kind and their derivatives with real arguments.
CLQMN Evaluate a sequence of associated Legendre functions of the
second kind and their derivatives with complex arguments.
LPMV Evaluate associated Legendre functions of the first kind
with an integer order and arbitrary non-negative degree.
*****
JY01A Evaluate the zeroth- and first-order Bessel functions of the
first and second kinds with real arguments using series and
asymptotic expansions.
JY01B Evaluate the zeroth- and first-order Bessel functions of the
first and second kinds with real arguments using polynomial
approximations.
JYNA Evaluate a sequence of Bessel functions of the first and
second kinds and their derivatives with integer orders and
real arguments (method 1).
JYNB Evaluate a sequence of Bessel functions of the first and
second kinds and their derivatives with integer orders and
real arguments (method 2).
CJY01 Evaluate the zeroth- and first-order Bessel functions of the
first and second kinds and their derivatives with complex
arguments.
CJYNA Evaluate a sequence of Bessel functions of the first and
second kinds and their derivatives with integer orders and
complex arguments (method 1).
CJYNB Evaluate a sequence of Bessel functions of the first and
second kinds and their derivatives with integer orders and
complex arguments (method 2).
JYV Evaluate a sequence of Bessel functions of the first and
second kinds and their derivatives with arbitrary real orders
and real arguments.
CJYVA Evaluate a sequence of Bessel functions of the first and
second kinds and their derivatives with arbitrary real orders
and complex arguments (method 1).
CJYVB Evaluate a sequence of Bessel functions of the first and
second kinds and their derivatives with arbitrary real orders
and complex arguments (method 2).
CJK Evaluate the coefficients for the asymptotic expansion of
Bessel functions for large orders.
CJYLV Evaluate Bessel functions of the first and second kinds and
their derivatives with a large arbitrary real order and complex
arguments.
JYZO Evaluate the zeros of the Bessel functions of the first and
second kinds and their derivatives.
JDZO Evaluate the zeros of the Bessel functions of the first kind
and their derivatives.
CYZO Evaluate the complex zeros of the Bessel functions of the
second kind of order zero and one.
LAMN Evaluate a sequence of lambda functions with integer orders
and their derivatives.
LAMV Evaluate a sequence of lambda functions with arbitrary orders
and their derivatives.
*****
IK01A Evaluate the zeroth- and first-order modified Bessel
functions of the first and second kinds with real arguments.
IK01B Evaluate the zeroth- and first-order modified Bessel
functions of the first and second kinds with real arguments.
IKNA Evaluate a sequence of modified Bessel functions of the
first and second kinds and their derivatives with integer
orders and real arguments (method 1).
IKNB Evaluate a sequence of modified Bessel functions of the
first and second kinds and their derivatives with integer
orders and real arguments (method 2).
CIK01 Evaluate the zeroth- and first-order modified Bessel
functions of the first and second kinds and their derivatives
with complex arguments.
CIKNA Evaluate a sequence of modified Bessel functions of the
first and second kinds and their derivatives with integer
orders and complex arguments (method 1).
CIKNB Evaluate a sequence of modified Bessel functions of the
first and second kinds and their derivatives with integer
orders and complex arguments (method 2).
IKV Evaluate a sequence of modified Bessel functions of the
first and second kinds and their derivatives with arbitrary
real orders and real arguments.
CIKVA Evaluate a sequence of modified Bessel functions of the
first and second kinds and their derivatives with arbitrary
real orders and complex arguments.
CIKVB Evaluate a sequence of modified Bessel functions of the
first and second kinds and their derivatives with arbitrary
real orders and complex arguments.
CIKLV Evaluate modified Bessel functions of the first and second
kinds and their derivatives with a large arbitrary real order
and complex arguments.
CH12N Evaluate a sequence of Hankel functions of the first and
second kinds and their derivatives with integer orders and
complex arguments.
*****
ITJYA Evaluate the integral of Bessel functions J0(t) and Y0(t)
from 0 to x using series and asymptotic expansions.
ITJYB Evaluate the integral of Bessel functions J0(t) and Y0(t)
from 0 to x using polynomial approximations.
ITTJYA Evaluate the integral of [1-J0(t)]/t from 0 to x and Y0(t)/t
from x to infinity using series and asymptotic expansions.
ITTJYB Evaluate the integral of [1-J0(t)]/t from 0 to x and Y0(t)/t
from x to infinity using polynomial approximations.
ITIKA Evaluate the integral of modified Bessel functions I0(t) and
K0(t) from 0 to x using series and asymptotic expansions.
ITIKB Evaluate the integral of modified Bessel functions I0(t) and
K0(t) from 0 to x using polynomial approximations.
ITTIKA Evaluate the integral of [1-I0(t)]/t from 0 to x and K0(t)
from x to infinity using series and asymptotic expansions.
ITTIKB Evaluate the integral of [1-I0(t)]/t from 0 to x and K0(t)
from x to infinity using polynomial approximations.
****
SPHJ Evaluate a sequence of spherical Bessel functions of the
first kind and their derivatives with integer orders and
real arguments.
SPHY Evaluate a sequence of spherical Bessel functions of the
second kind and their derivatives with integer orders and
real arguments.
CSPHJY Evaluate a sequence of spherical Bessel functions of the
first and second kinds and their derivatives with integer
orders and complex arguments.
RCTJ Evaluate a sequence of Riccati-Bessel functions and their
derivatives of the first kind.
RCTY Evaluate a sequence of Riccati-Bessel functions and their
derivatives of the second kind.
SPHI Evaluate a sequence of modified spherical Bessel functions
of the first kind and their derivatives with integer orders
and real arguments.
SPHK Evaluate a sequence of modified spherical Bessel functions
of the second kind and their derivatives with integer orders
and real arguments.
CSPHIK Evaluate a sequence of modified spherical Bessel functions
of the first and second kinds and their derivatives with
integer orders and complex arguments.
*****
KLVNA Evaluate the Kelvin functions and their derivatives using
series and asymptotic expansions.
KLVNB Evaluate the Kelvin functions and their derivatives using
polynomial approximations.
KLVNZO Evaluate the zeros of the Kelvin functions and their
derivatives.
*****
AIRYA Evaluate the Airy functions and their derivatives by means
of Bessel functions.
AIRYB Evaluate the Airy functions and their derivatives using the
series and asymptotic expansions.
ITAIRY Evaluate the integral of the Airy functions.
AIRYZO Evaluate the zeros of Airy functions and their derivatives.
*****
STVH0 Evaluate the zeroth-order Struve function.
STVH1 Evaluate the first-order Struve function.
STVHV Evaluate the Struve functions with an arbitrary order.
ITSH0 Evaluate the integral of Struve function H0(t) from 0 to x.
ITTH0 Evaluate the integral of H0(t)/t from x to infinity.
STVL0 Evaluate the zeroth-order modified Struve function.
STVL1 Evaluate the first-order modified Struve function.
STVLV Evaluate the modified Struve function with an arbitrary
order.
ITSL0 Evaluate the integral of modified Struve function L0(t)
from 0 to x.
*****
HYGFX Evaluate the hypergeometric function with real arguments.
HYGFZ Evaluate the hypergeometric function with complex arguments.
*****
CHGM Evaluate the confluent hypergeometric function M(a,b,x) with
real arguments.
CCHG Evaluate the confluent hypergeometric function M(a,b,z) with
complex arguments.
CHGU Evaluate the confluent hypergeometric function U(a,b,x) with
real arguments.
*****
PBDV Evaluate a sequence of parabolic cylinder functions Dv(x) and
their derivatives.
PBVV Evaluate a sequence of parabolic cylinder functions Vv(x) and
their derivatives.
PBWA Evaluate parabolic cylinder functions W(a,+/-x) and their
derivatives.
CPBDN Evaluate a sequence of parabolic cylinder functions Dn(z) and
their derivatives for complex arguments.
*****
CVA1 Evaluate a sequence of characteristic values for the Mathieu
and modified Mathieu functions.
CVA2 Evaluate a specific characteristic value for the Mathieu
and modified Mathieu functions.
FCOEF Evaluate the expansion coefficients for the Mathieu and
modified Mathieu functions.
MTU0 Evaluate the Mathieu functions and their derivatives.
MTU12 Evaluate the modified Mathieu functions of the first and
second kinds and their derivatives.
*****
SEGV Evaluate a sequence of characteristic values for spheroidal
wave functions.
SDMN Evaluate the expansion coefficients d_k^mn for spheroidal
wave functions.
SCKA Evaluate the expansion coefficients c_2k^mn for spheroidal
wave functions (method 1).
SCKB Evaluate the expansion coefficients c_2k^mn for spheroidal
wave functions (method 2).
ASWFA Evaluate the angular spheroidal wave functions of the first
kind (method 1).
ASWFB Evaluate the angular spheroidal wave functions of the first
kind (method 2).
RSWFP Evaluate the radial prolate spheroidal wave functions of the
first and second kinds.
RSWFO Evaluate the radial oblate spheroidal wave functions of the
first and second kinds.
LPMNS Evaluate a sequence of the associated Legendre functions of
the first kind and their derivatives with real arguments
for a given order.
LQMNS Evaluate a sequence of the associated Legendre functions of
the second kind and their derivatives with real arguments
for a given order.
*****
ERROR Evaluate the error function.
CERROR Evaluate the error function with a complex argument.
*****
FCS Evaluate the Fresnel Integrals.
FFK Evaluate the modified Fresnel integrals.
CERZO Evaluate the complex zeros of the error function.
FCSZO Evaluate the complex zeros of the Fresnel Integrals.
*****
CISIA Evaluate the cosine and sine integrals using their series
and asymptotic expansions.
CISIB Evaluate the cosine and sine integrals using their rational
approximations.
*****
COMELP Evaluate the complete elliptic integrals of the first and
second kinds.
ELIT Evaluate the incomplete elliptic integrals of the first and
second kinds.
ELIT3 Evaluate the complete and incomplete elliptic integrals of
the third kind.
JELP Evaluate the Jacobian elliptic functions.
*****
E1XA Evaluate the exponential integral E1(x) using its polynomial
approximations.
E1XB Evaluate the exponential integral E1(x) using its series and
continued fraction expressions.
E1Z Evaluate the exponential integral E1(z) for complex arguments.
ENXA Evaluate a sequence of exponential integrals En(x) (method 1).
ENXB Evaluate a sequence of exponential integrals En(x) (method 2).
EIX Evaluate the exponential integral Ei(x).