Computation of special functions
Shanjie Zhang and Jianming Jin
Copyrighted but permission granted to use code in programs. Buy their book "Computation of Special Functions", 1996, John Wiley & Sons, Inc.
Made functions return sf_error codes in ISFER variables instead of printing warnings. The codes are:
SF_ERROR_OK = 0 : no errorSF_ERROR_SINGULAR = 1 : singularity encounteredSF_ERROR_UNDERFLOW = 2 : floating point underflowSF_ERROR_OVERFLOW = 3 : floating point overflowSF_ERROR_SLOW = 4 : too many iterations requiredSF_ERROR_LOSS = 5 : loss of precisionSF_ERROR_NO_RESULT = 6 : no result obtainedSF_ERROR_DOMAIN = 7 : out of domainSF_ERROR_ARG = 8 : invalid input parameterSF_ERROR_OTHER = 9 : unclassified error| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private, | parameter | :: | wp | = | real64 |
Real working precision if not specified [8 bytes] |
| integer, | public, | parameter | :: | specfun_wp | = | wp |
Working precision |
| real(kind=wp), | private, | parameter | :: | pi | = | acos(-1.0_wp) | |
| real(kind=wp), | private, | parameter | :: | sqrtpi | = | sqrt(pi) | |
| real(kind=wp), | private, | parameter | :: | halfpi | = | 0.5_wp*pi | |
| real(kind=wp), | private, | parameter | :: | twopi | = | 2.0_wp*pi | |
| real(kind=wp), | private, | parameter | :: | sq2 | = | sqrt(2.0_wp) | |
| real(kind=wp), | public, | parameter | :: | gamma | = | 0.57721566490153286060651209008240243104215933593992_wp |
Euler's constant to 50 decimal places.
|
Determine the starting point for backward recurrence such that the magnitude of Jn(x) at that point is about 10^(-MP)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Argument of Jn(x) |
||
| integer, | intent(in) | :: | Mp |
Value of magnitude |
Starting point
Determine the starting point for backward recurrence such that all Jn(x) has MP significant digits
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Argument of Jn(x) |
||
| integer, | intent(in) | :: | n |
Order of Jn(x) |
||
| integer, | intent(in) | :: | Mp |
Significant digit |
Starting point
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n | |||
| real(kind=wp), | intent(in) | :: | x |
Compute complex parabolic cylinder function Dn(z) for small argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
Order of D(z) (n = 0,-1,-2,...) |
||
| complex(kind=wp), | intent(in) | :: | z |
complex argument of D(z) |
||
| complex(kind=wp), | intent(out) | :: | Cdn |
Dn(z) |
Compute complex Fresnel Integral S(z) and S'(z)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=wp), | intent(in) | :: | z |
Argument of S(z) |
||
| complex(kind=wp), | intent(out) | :: | Zf |
S(z) |
||
| complex(kind=wp), | intent(out) | :: | Zd |
S'(z) |
Compute the associated Legendre functions of the second kind, Qmn(x) and Qmn'(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | mm |
Physical dimension of QM and QD |
||
| integer, | intent(in) | :: | m |
Order of Qmn(x) ( m = 0,1,2,… ) |
||
| integer, | intent(in) | :: | n |
Degree of Qmn(x) ( n = 0,1,2,… ) |
||
| real(kind=wp), | intent(in) | :: | x |
Argument of Qmn(x) |
||
| real(kind=wp), | intent(out) | :: | Qm(0:Mm,0:n) |
Qmn(x) |
||
| real(kind=wp), | intent(out) | :: | Qd(0:Mm,0:n) |
Qmn'(x) |
Compute the associated Legendre functions Pmn(z) and their derivatives Pmn'(z) for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | mm |
Physical dimension of CPM and CPD |
||
| integer, | intent(in) | :: | m |
Order of Pmn(z), m = 0,1,2,...,n |
||
| integer, | intent(in) | :: | n |
Degree of Pmn(z), n = 0,1,2,...,N |
||
| real(kind=wp), | intent(in) | :: | x |
Real part of z |
||
| real(kind=wp), | intent(in) | :: | y |
Imaginary part of z |
||
| integer, | intent(in) | :: | ntype |
type of cut, either 2 or 3 |
||
| complex(kind=wp), | intent(out) | :: | Cpm(0:Mm,0:n) |
Pmn(z) |
||
| complex(kind=wp), | intent(out) | :: | Cpd(0:Mm,0:n) |
Pmn'(z) |
Compute parabolic cylinder function Vv(x) for small argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | Va |
Order |
||
| real(kind=wp), | intent(in) | :: | x |
Argument |
||
| real(kind=wp), | intent(out) | :: | Pv |
Vv(x) |
Compute the zeros of Bessel functions Jn(x) and Jn'(x), and arrange them in the order of their magnitudes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | Nt |
Number of total zeros ( NT ≤ 1200 ) |
||
| integer, | intent(out) | :: | n(1400) |
n, order of Jn(x) or Jn'(x) associated with the L-th zero |
||
| integer, | intent(out) | :: | m(1400) |
m, serial number of the zeros of Jn(x) or Jn'(x) associated with the L-th zero ( L is the serial number of all the zeros of Jn(x) and Jn'(x) ) |
||
| integer, | intent(out) | :: | p(1400) |
0 (TM) or 1 (TE), a code for designating the zeros of Jn(x) or Jn'(x). In the waveguide applications, the zeros of Jn(x) correspond to TM modes and those of Jn'(x) correspond to TE modes |
||
| real(kind=wp), | intent(out) | :: | Zo(0:1400) |
Value of the L-th zero of Jn(x) and Jn'(x) |
Compute coefficient Bk's for oblate radial functions with a small argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | m | |||
| integer, | intent(in) | :: | n | |||
| real(kind=wp), | intent(in) | :: | c | |||
| real(kind=wp), | intent(in) | :: | Cv | |||
| real(kind=wp), | intent(in) | :: | Qt | |||
| real(kind=wp), | intent(in) | :: | Ck(200) | |||
| real(kind=wp), | intent(out) | :: | Bk(200) |
Compute prolate spheroidal radial function of the second kind with a small argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | m | |||
| integer, | intent(in) | :: | n | |||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Cv | ||||
| real(kind=wp) | :: | Df(200) | ||||
| integer | :: | Kd | ||||
| real(kind=wp), | intent(out) | :: | R2f | |||
| real(kind=wp), | intent(out) | :: | R2d |
Compute Bernoulli number Bn
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
Serial number |
||
| real(kind=wp), | intent(out) | :: | Bn(0:n) |
|
Compute Bernoulli number Bn
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
Serial number |
||
| real(kind=wp), | intent(out) | :: | Bn(0:n) |
|
Compute Q*mn(-ic) for oblate radial functions with a small argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | m | |||
| integer, | intent(in) | :: | n | |||
| real(kind=wp), | intent(in) | :: | c | |||
| real(kind=wp), | intent(in) | :: | Ck(200) | |||
| real(kind=wp), | intent(in) | :: | Ck1 | |||
| real(kind=wp), | intent(out) | :: | Qs | |||
| real(kind=wp), | intent(out) | :: | Qt |
Compute the initial characteristic value of Mathieu functions for m ≤ 12 or q ≤ 300 or q ≥ m*m
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | Kd | |||
| integer, | intent(in) | :: | m |
Order of Mathieu functions |
||
| real(kind=wp), | intent(in) | :: | q |
Parameter of Mathieu functions |
||
| real(kind=wp), | intent(out) | :: | a0 |
Characteristic value |
Compute the characteristic value of Mathieu functions for q ≤ m*m
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | m |
Order of Mathieu functions |
||
| real(kind=wp), | intent(in) | :: | q |
Parameter of Mathieu functions |
||
| real(kind=wp), | intent(out) | :: | a0 |
Initial characteristic value |
Compute the characteristic value of Mathieu functions for q ≥ 3m
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | Kd | |||
| integer, | intent(in) | :: | m |
Order of Mathieu functions |
||
| real(kind=wp), | intent(in) | :: | q |
Parameter of Mathieu functions |
||
| real(kind=wp), | intent(out) | :: | a0 |
Initial characteristic value |
Integrate [1-J0(t)]/t with respect to t from 0 to x, and Y0(t)/t with respect to t from x to ∞
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Variable in the limits ( x ≥ 0 ) |
||
| real(kind=wp), | intent(out) | :: | Ttj |
Integration of [1-J0(t)]/t from 0 to x |
||
| real(kind=wp), | intent(out) | :: | Tty |
Integration of Y0(t)/t from x to ∞ |
Integrate [1-J0(t)]/t with respect to t from 0 to x, and Y0(t)/t with respect to t from x to ∞
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Variable in the limits ( x ≥ 0 ) |
||
| real(kind=wp), | intent(out) | :: | Ttj |
Integration of [1-J0(t)]/t from 0 to x |
||
| real(kind=wp), | intent(out) | :: | Tty |
Integration of Y0(t)/t from x to ∞ |
Compute Bessel functions Jv(z) and Yv(z) and their derivatives with a complex argument and a large order
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | v |
Order of Jv(z) and Yv(z) |
||
| complex(kind=wp), | intent(in) | :: | z |
Complex argument |
||
| real(kind=wp), | intent(out) | :: | Cbjv |
Jv(z) |
||
| real(kind=wp), | intent(out) | :: | Cdjv |
Jv'(z) |
||
| real(kind=wp), | intent(out) | :: | Cbyv |
Yv(z) |
||
| real(kind=wp), | intent(out) | :: | Cdyv |
Yv'(z) |
Compute prolate and oblate spheroidal radial functions of the second kind for given m, n, c and a large cx
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(200) | :: | Df | |||
| integer | :: | Kd | ||||
| real(kind=wp) | :: | R2f | ||||
| real(kind=wp) | :: | R2d | ||||
| integer | :: | Id |
Compute Psi function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Argument of |
||
| real(kind=wp), | intent(out) | :: | Ps |
|
Calculate a specific characteristic value of Mathieu functions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | Kd |
Case code: |
||
| integer, | intent(in) | :: | m |
Order of Mathieu functions |
||
| real(kind=wp), | intent(in) | :: | q |
Parameter of Mathieu functions |
||
| real(kind=wp), | intent(out) | :: | a |
Characteristic value |
Compute associated Legendre functions Pmn(x) and Pmn'(x) for a given order
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | m |
Order of |
||
| integer, | intent(in) | :: | n |
Degree of |
||
| real(kind=wp), | intent(in) | :: | x |
Argument of |
||
| real(kind=wp), | intent(out) | :: | Pm(0:n) |
|
||
| real(kind=wp), | intent(out) | :: | Pd(0:n) |
|
Compute complex Error function erf(z) & erf'(z)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=wp), | intent(in) | :: | z |
Complex argument of erf(z) |
||
| complex(kind=wp), | intent(out) | :: | Cer |
|
||
| complex(kind=wp), | intent(out) | :: | Cder |
|
Compute prolate spheriodal radial functions of the first and second kinds, and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | m |
Mode parameter, |
||
| integer, | intent(in) | :: | n |
Mode parameter, |
||
| real(kind=wp), | intent(in) | :: | c |
Spheroidal parameter |
||
| real(kind=wp), | intent(in) | :: | x |
Argument of radial function ( |
||
| real(kind=wp), | intent(in) | :: | cv |
Characteristic value |
||
| integer, | intent(in) | :: | Kf |
Function code:
* |
||
| real(kind=wp), | intent(out) | :: | R1f |
Radial function of the first kind |
||
| real(kind=wp), | intent(out) | :: | R1d |
Derivative of the radial function of the first kind |
||
| real(kind=wp), | intent(out) | :: | R2f |
Radial function of the second kind |
||
| real(kind=wp), | intent(out) | :: | R2d |
Derivative of the radial function of the second kind |
Compute Bessel functions Jn(x) and Yn(x), and
their first and second derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
Order of Jn(x) and Yn(x) |
||
| real(kind=wp), | intent(in) | :: | x |
Argument of Jn(x) and Yn(x) ( x > 0 ) |
||
| real(kind=wp), | intent(out) | :: | Bjn |
|
||
| real(kind=wp), | intent(out) | :: | Djn |
|
||
| real(kind=wp), | intent(out) | :: | Fjn |
|
||
| real(kind=wp), | intent(out) | :: | Byn |
|
||
| real(kind=wp), | intent(out) | :: | Dyn |
|
||
| real(kind=wp), | intent(out) | :: | Fyn |
|
Compute gamma function Г(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Argument of |
||
| real(kind=wp), | intent(out) | :: | Ga |
|
Compute cosine and sine integrals
Si(x) and Ci(x) ( x ≥ 0 )
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Argument of |
||
| real(kind=wp), | intent(out) | :: | Ci |
|
||
| real(kind=wp), | intent(out) | :: | Si |
|
Compute Euler number En
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
Serial number |
||
| real(kind=wp), | intent(out) | :: | En(0:n) |
|
calculate the accurate characteristic value by the secant method
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | Kd | |||
| integer, | intent(in) | :: | m |
Order of Mathieu functions |
||
| real(kind=wp), | intent(in) | :: | q |
Parameter of Mathieu functions |
||
| real(kind=wp), | intent(inout) | :: | a |
Parameter of Mathieu functions |
Compute cosine and sine integrals
Si(x) and Ci(x) ( x ≥ 0 )
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Argument of |
||
| real(kind=wp), | intent(out) | :: | Ci |
|
||
| real(kind=wp), | intent(out) | :: | Si |
|
Evaluate the integral of modified Struve function L0(t) with respect to t from 0 to x
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Upper limit ( x ≥ 0 ) |
||
| real(kind=wp), | intent(out) | :: | Tl0 |
Integration of L0(t) from 0 to x |
Compute the Legendre functions Qn(z) and
their derivatives Qn'(z) for a complex
argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
Degree of Qn(z), n = 0,1,2,... |
||
| real(kind=wp), | intent(in) | :: | x |
Real part of z |
||
| real(kind=wp), | intent(in) | :: | y |
Imaginary part of z |
||
| complex(kind=wp), | intent(out) | :: | Cqn(0:n) |
|
||
| complex(kind=wp), | intent(out) | :: | Cqd(0:n) |
|
Compute the first NT zeros of Airy functions Ai(x) and Ai'(x), a and a', and the associated values of Ai(a') and Ai'(a); and the first NT zeros of Airy functions Bi(x) and Bi'(x), b and b', and the associated values of Bi(b') and Bi'(b)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | Nt |
Total number of zeros |
||
| integer, | intent(in) | :: | Kf |
Function code: |
||
| real(kind=wp), | intent(out) | :: | Xa(Nt) |
a, the m-th zero of Ai(x) or b, the m-th zero of Bi(x) |
||
| real(kind=wp), | intent(out) | :: | Xb(Nt) |
a', the m-th zero of Ai'(x) or b', the m-th zero of Bi'(x) |
||
| real(kind=wp), | intent(out) | :: | Xc(Nt) |
Ai(a') or Bi(b') |
||
| real(kind=wp), | intent(out) | :: | Xd(Nt) |
Ai'(a) or Bi'(b) ( The index is the serial number of zeros ) |
Compute error function erf(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Argument of |
||
| real(kind=wp), | intent(out) | :: | Err |
|
Compute error function erf(z) for a complex
argument (z=x+iy)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=wp), | intent(in) | :: | z |
Complex argument |
||
| complex(kind=wp), | intent(out) | :: | Cer |
|
Compute Euler number En
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
Serial number |
||
| real(kind=wp), | intent(out) | :: | En(0:n) |
|
Compute a sequence of characteristic values of Mathieu functions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | Kd |
Case code: |
||
| integer, | intent(in) | :: | m |
Maximum order of Mathieu functions |
||
| real(kind=wp), | intent(in) | :: | q |
Parameter of Mathieu functions |
||
| real(kind=wp), | intent(out) | :: | Cv(200) |
CV(I) --- Characteristic values; I = 1,2,3,... |
Integrate [I0(t)-1]/t with respect to t from 0 to x, and K0(t)/t with respect to t from x to ∞
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Variable in the limits ( x ≥ 0 ) |
||
| real(kind=wp), | intent(out) | :: | Tti |
Integration of [I0(t)-1]/t from 0 to x |
||
| real(kind=wp), | intent(out) | :: | Ttk |
Integration of K0(t)/t from x to ∞ |
Compute Legendre functions Qn(x) & Qn'(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
Degree of Qn(x) ( n = 0,1,2,…) |
||
| real(kind=wp), | intent(in) | :: | x |
Argument of Qn(x) |
||
| real(kind=wp), | intent(out) | :: | Qn(0:n) |
Qn(x) |
||
| real(kind=wp), | intent(out) | :: | Qd(0:n) |
Qn'(x) |
Compute the expansion coefficients for the asymptotic expansion of Bessel functions with large orders
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | Km |
Maximum k |
||
| real(kind=wp), | intent(out), | dimension(*) | :: | a |
A(L) --- Cj(k) where j and k are related to L by L=j+1+[k*(k+1)]/2; j,k=0,1,...,Km |
Integrate [I0(t)-1]/t with respect to t from 0 to x, and K0(t)/t with respect to t from x to ∞
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
Variable in the limits ( x ≥ 0 ) |
||
| real(kind=wp), | intent(out) | :: | Tti |
Integration of [I0(t)-1]/t from 0 to x |
||
| real(kind=wp), | intent(out) | :: | Ttk |
Integration of K0(t)/t from x to ∞ |
Compute lambda function with arbitrary order v,
and their derivative
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | v |
Order of lambda function |
||
| real(kind=wp), | intent(in) | :: | xi |
Argument of lambda function |
||
| real(kind=wp), | intent(out) | :: | Vm |
Highest order computed |
||
| real(kind=wp), | intent(out), | dimension(0:*) | :: | Vl |
Lambda function of order |
|
| real(kind=wp), | intent(out), | dimension(0:*) | :: | Dl |
Derivative of lambda function |
Compute hypergeometric function U(a,b,x) by using Gaussian-Legendre integration (n=60)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | a |
Parameter ( |
||
| real(kind=wp), | intent(in) | :: | b |
Parameter |
||
| real(kind=wp), | intent(in) | :: | x |
Argument ( |
||
| real(kind=wp), | intent(out) | :: | Hu |
|
||
| integer, | intent(out) | :: | Id |
Estimated number of significant digits |
Compute the expansion coefficients of the prolate and oblate spheroidal functions and joining factors
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | Cv | ||||
| integer | :: | Kd | ||||
| real(kind=wp), | dimension(200) | :: | Df | |||
| real(kind=wp), | dimension(200) | :: | Dn | |||
| real(kind=wp) | :: | Ck1 | ||||
| real(kind=wp) | :: | Ck2 |
Compute the zeros of Laguerre polynomial Ln(x) in the interval [0,∞], and the corresponding weighting coefficients for Gauss-Laguerre integration
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
Order of the Laguerre polynomial |
||
| real(kind=wp), | intent(out), | dimension(n) | :: | x |
Zeros of the Laguerre polynomial |
|
| real(kind=wp), | intent(out), | dimension(n) | :: | w |
Corresponding weighting coefficients |
Compute parabolic cylinder function Vv(x)
for large argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | Va |
Order |
||
| real(kind=wp), | intent(in) | :: | x |
Argument |
||
| real(kind=wp), | intent(out) | :: | Pv |
|
Compute Bessel functions Jv(z), Yv(z) and their
derivatives for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | v |
Order of |
||
| complex(kind=wp), | intent(in) | :: | z |
Complex argument |
||
| integer, | intent(out) | :: | Vm |
Highest order computed |
||
| complex(kind=wp), | intent(out), | dimension(0:*) | :: | Cbj |
|
|
| complex(kind=wp), | intent(out), | dimension(0:*) | :: | Cdj |
|
|
| complex(kind=wp), | intent(out), | dimension(0:*) | :: | Cby |
|
|
| complex(kind=wp), | intent(out), | dimension(0:*) | :: | Cdy |
|
Compute Bessel functions Jv(z), Yv(z) and their derivatives for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | v | ||||
| complex(kind=wp) | :: | z | ||||
| real(kind=wp) | :: | Vm | ||||
| complex(kind=wp), | dimension(0:*) | :: | Cbj | |||
| complex(kind=wp), | dimension(0:*) | :: | Cdj | |||
| complex(kind=wp), | dimension(0:*) | :: | Cby | |||
| complex(kind=wp), | dimension(0:*) | :: | Cdy |
Compute Bessel functions J0(x), J1(x), Y0(x), Y1(x), and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Bj0 | ||||
| real(kind=wp) | :: | Dj0 | ||||
| real(kind=wp) | :: | Bj1 | ||||
| real(kind=wp) | :: | Dj1 | ||||
| real(kind=wp) | :: | By0 | ||||
| real(kind=wp) | :: | Dy0 | ||||
| real(kind=wp) | :: | By1 | ||||
| real(kind=wp) | :: | Dy1 |
Compute the incomplete gamma function r(a,x), Г(a,x) and P(a,x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | a | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Gin | ||||
| real(kind=wp) | :: | Gim | ||||
| real(kind=wp) | :: | Gip | ||||
| integer | :: | Isfer |
Integrate Bessel functions I0(t) and K0(t) with respect to t from 0 to x
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Ti | ||||
| real(kind=wp) | :: | Tk |
Integrate modified Bessel functions I0(t) and K0(t) with respect to t from 0 to x
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Ti | ||||
| real(kind=wp) | :: | Tk |
Compute Bessel functions Jv(x) and Yv(x) and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | v | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Vm | ||||
| real(kind=wp), | dimension(0:*) | :: | Bj | |||
| real(kind=wp), | dimension(0:*) | :: | Dj | |||
| real(kind=wp), | dimension(0:*) | :: | By | |||
| real(kind=wp), | dimension(0:*) | :: | Dy |
Compute Bessel functions Jn(x), Yn(x) and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n) | :: | Bj | |||
| real(kind=wp), | dimension(0:n) | :: | Dj | |||
| real(kind=wp), | dimension(0:n) | :: | By | |||
| real(kind=wp), | dimension(0:n) | :: | Dy |
Compute Bessel functions Jn(x), Yn(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| integer | :: | Nmin | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n-nmin) | :: | Bj | |||
| real(kind=wp), | dimension(0:n-nmin) | :: | By |
Compute the zeros of Legendre polynomial Pn(x) in the interval [-1,1], and the corresponding weighting coefficients for Gauss-Legendre integration
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp), | dimension(n) | :: | x | |||
| real(kind=wp), | dimension(n) | :: | w |
Compute the prolate and oblate spheroidal angular functions of the first kind and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Kd | ||||
| real(kind=wp) | :: | Cv | ||||
| real(kind=wp) | :: | S1f | ||||
| real(kind=wp) | :: | S1d |
Compute Bessel functions Jn(x) & Yn(x) and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n) | :: | Bj | |||
| real(kind=wp), | dimension(0:n) | :: | Dj | |||
| real(kind=wp), | dimension(0:n) | :: | By | |||
| real(kind=wp), | dimension(0:n) | :: | Dy |
Compute parabolic cylinder functions Dv(x) and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | v | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(0:*) | :: | Dv | |||
| real(kind=wp), | dimension(0:*) | :: | Dp | |||
| real(kind=wp) | :: | |||||
| real(kind=wp) | :: | Pdd |
Evaluate the integral of Struve function H0(t) with respect to t from 0 and x
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Th0 |
Evaluate the complex zeros of error function erf(z) using the modified Newton's iteration method
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Nt | ||||
| complex(kind=wp), | dimension(nt) | :: | Zo |
Compute gamma function Г(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Ga |
Compute the confluent hypergeometric function U(a,b,x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | a | ||||
| real(kind=wp) | :: | b | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Hu | ||||
| integer | :: | Md | ||||
| integer | :: | Isfer |
Compute lambda functions and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n) | :: | Bl | |||
| real(kind=wp), | dimension(0:n) | :: | Dl |
Compute complete elliptic integrals K(k) and E(k)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | Hk | ||||
| real(kind=wp) | :: | Ck | ||||
| real(kind=wp) | :: | Ce |
Compute the incomplete beta function Ix(a,b)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | a | ||||
| real(kind=wp) | :: | b | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Bix |
Compute the value of F for characteristic equation of Mathieu functions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Kd | ||||
| integer | :: | m | ||||
| real(kind=wp) | :: | q | ||||
| real(kind=wp) | :: | a | ||||
| integer | :: | Mj | ||||
| real(kind=wp) | :: | f |
Compute Legendre polynomials Pn(z) and their derivatives Pn'(z) for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | y | ||||
| complex(kind=wp), | dimension(0:n) | :: | Cpn | |||
| complex(kind=wp), | dimension(0:n) | :: | Cpd |
Compute associated Legendre functions Qmn(x) and Qmn'(x) for a given order
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(0:n) | :: | Qm | |||
| real(kind=wp), | dimension(0:n) | :: | Qd |
Compute modified Bessel functions Iv(z) and Kv(z) and their derivatives with a complex argument and a large order
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | v | ||||
| complex(kind=wp) | :: | z | ||||
| complex(kind=wp) | :: | Cbiv | ||||
| complex(kind=wp) | :: | Cdiv | ||||
| complex(kind=wp) | :: | Cbkv | ||||
| complex(kind=wp) | :: | Cdkv |
Compute complete and incomplete elliptic integrals F(k,phi) and E(k,phi)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | Hk | ||||
| real(kind=wp) | :: | Phi | ||||
| real(kind=wp) | :: | Fe | ||||
| real(kind=wp) | :: | Ee |
Compute the elliptic integral of the third kind using Gauss-Legendre quadrature
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | Phi | ||||
| real(kind=wp) | :: | Hk | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | El3 |
Compute exponential integral Ei(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Ei |
Compute exponential integral Ei(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=wp) | :: | z | ||||
| complex(kind=wp) | :: | Cei |
Compute exponential integral E1(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | e1 |
Compute confluent hypergeometric function M(a,b,x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | a | ||||
| real(kind=wp) | :: | b | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Hg |
Compute hypergeometric function F(a,b,c,x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | a | ||||
| real(kind=wp) | :: | b | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Hf | ||||
| integer | :: | Isfer |
Compute confluent hypergeometric function M(a,b,z) with real parameters a, b and a complex argument z
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | a | ||||
| real(kind=wp) | :: | b | ||||
| complex(kind=wp) | :: | z | ||||
| complex(kind=wp) | :: | Chg |
Compute the hypergeometric function for a complex argument, F(a,b,c,z)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | a | ||||
| real(kind=wp) | :: | b | ||||
| real(kind=wp) | :: | c | ||||
| complex(kind=wp) | :: | z | ||||
| complex(kind=wp) | :: | Zhf | ||||
| integer | :: | Isfer |
Compute the integrals of Airy fnctions with respect to t from 0 and x ( x ≥ 0 )
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Apt | ||||
| real(kind=wp) | :: | Bpt | ||||
| real(kind=wp) | :: | Ant | ||||
| real(kind=wp) | :: | Bnt |
Compute modified Bessel functions In(x) and Kn(x), and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n) | :: | Bi | |||
| real(kind=wp), | dimension(0:n) | :: | Di | |||
| real(kind=wp), | dimension(0:n) | :: | Bk | |||
| real(kind=wp), | dimension(0:n) | :: | Dk |
Compute Bessel functions Jn(z), Yn(z) and their derivatives for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| complex(kind=wp) | :: | z | ||||
| integer | :: | Nm | ||||
| complex(kind=wp), | dimension(0:n) | :: | Cbj | |||
| complex(kind=wp), | dimension(0:n) | :: | Cdj | |||
| complex(kind=wp), | dimension(0:n) | :: | Cby | |||
| complex(kind=wp), | dimension(0:n) | :: | Cdy |
Compute modified Bessel functions In(x) and Kn(x), and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n) | :: | Bi | |||
| real(kind=wp), | dimension(0:n) | :: | Di | |||
| real(kind=wp), | dimension(0:n) | :: | Bk | |||
| real(kind=wp), | dimension(0:n) | :: | Dk |
Compute the associated Legendre functions Pmn(x) and their derivatives Pmn'(x) for real argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Mm | ||||
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(0:mm,0:n) | :: | Pm | |||
| real(kind=wp), | dimension(0:mm,0:n) | :: | Pd |
Compute Mathieu functions cem(x,q) and sem(x,q) and their derivatives ( q ≥ 0 )
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Kf | ||||
| integer | :: | m | ||||
| real(kind=wp) | :: | q | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Csf | ||||
| real(kind=wp) | :: | Csd |
Compute complex Bessel functions Y0(z), Y1(z) and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Kf | ||||
| complex(kind=wp) | :: | z | ||||
| complex(kind=wp) | :: | Zf | ||||
| complex(kind=wp) | :: | Zd |
Compute modified Fresnel integrals F±(x) and K±(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Ks | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Fr | ||||
| real(kind=wp) | :: | Fi | ||||
| real(kind=wp) | :: | Fm | ||||
| real(kind=wp) | :: | Fa | ||||
| real(kind=wp) | :: | Gr | ||||
| real(kind=wp) | :: | Gi | ||||
| real(kind=wp) | :: | Gm | ||||
| real(kind=wp) | :: | Ga |
Compute Airy functions and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Ai | ||||
| real(kind=wp) | :: | Bi | ||||
| real(kind=wp) | :: | Ad | ||||
| real(kind=wp) | :: | Bd |
Compute Airy functions and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Ai | ||||
| real(kind=wp) | :: | Bi | ||||
| real(kind=wp) | :: | Ad | ||||
| real(kind=wp) | :: | Bd |
Compute the expansion coefficients of the prolate and oblate spheroidal functions, c2k
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | Cv | ||||
| integer | :: | Kd | ||||
| real(kind=wp), | dimension(200) | :: | Ck |
Compute the expansion coefficients of the prolate and oblate spheroidal functions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp), | dimension(200) | :: | Df | |||
| real(kind=wp), | dimension(200) | :: | Ck |
Compute complex parabolic cylinder function Dn(z) for large argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| complex(kind=wp) | :: | z | ||||
| complex(kind=wp) | :: | Cdn |
Compute the complex zeros of Fresnel integral C(z) or S(z) using modified Newton's iteration method
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Kf | ||||
| integer | :: | Nt | ||||
| complex(kind=wp), | dimension(nt) | :: | Zo |
Compute exponential integral E1(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | e1 |
Compute the associated Legendre function Pmv(x) with an integer order and an arbitrary nonnegative degree v
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | v | ||||
| integer | :: | m | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Pmv |
Compute the associated Legendre function Pmv(x) with an integer order and an arbitrary degree v, using recursion for large degrees
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | v | ||||
| integer | :: | m | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Pmv |
Compute the gamma function Г(z) or ln[Г(z)] for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | y | ||||
| integer | :: | Kf | ||||
| real(kind=wp) | :: | Gr | ||||
| real(kind=wp) | :: | Gi |
Compute the prolate and oblate spheroidal angular functions of the first kind and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Kd | ||||
| real(kind=wp) | :: | Cv | ||||
| real(kind=wp) | :: | S1f | ||||
| real(kind=wp) | :: | S1d |
Compute confluent hypergeometric function U(a,b,x) for small argument x
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | a | ||||
| real(kind=wp) | :: | b | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Hu | ||||
| integer | :: | Id |
Evaluate the integral H0(t)/t with respect to t from x to infinity
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Tth |
Compute gamma function Г(x) or ln[Г(x)]
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Kf | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Gl |
Compute Legendre functions Qn(x) and Qn'(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(0:n) | :: | Qn | |||
| real(kind=wp), | dimension(0:n) | :: | Qd |
Compute parabolic cylinder functions Dv(x) for large argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | Va | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Pd |
Compute modified Bessel functions I0(x), I1(1), K0(x) and K1(x), and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Bi0 | ||||
| real(kind=wp) | :: | Di0 | ||||
| real(kind=wp) | :: | Bi1 | ||||
| real(kind=wp) | :: | Di1 | ||||
| real(kind=wp) | :: | Bk0 | ||||
| real(kind=wp) | :: | Dk0 | ||||
| real(kind=wp) | :: | Bk1 | ||||
| real(kind=wp) | :: | Dk1 |
Compute the parabolic cylinder functions Dn(z) and Dn'(z) for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| complex(kind=wp) | :: | z | ||||
| complex(kind=wp), | dimension(0:*) | :: | Cpb | |||
| complex(kind=wp), | dimension(0:*) | :: | Cpd |
Compute modified Bessel functions I0(x), I1(1), K0(x) and K1(x), and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Bi0 | ||||
| real(kind=wp) | :: | Di0 | ||||
| real(kind=wp) | :: | Bi1 | ||||
| real(kind=wp) | :: | Di1 | ||||
| real(kind=wp) | :: | Bk0 | ||||
| real(kind=wp) | :: | Dk0 | ||||
| real(kind=wp) | :: | Bk1 | ||||
| real(kind=wp) | :: | Dk1 |
Compute the beta function B(p,q)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | p | ||||
| real(kind=wp) | :: | q | ||||
| real(kind=wp) | :: | Bt |
Compute Legendre polynomials Pn(x) and their derivatives Pn'(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(0:n) | :: | Pn | |||
| real(kind=wp), | dimension(0:n) | :: | Pd |
Compute expansion coefficients for Mathieu functions and modified Mathieu functions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Kd | ||||
| integer | :: | m | ||||
| real(kind=wp) | :: | q | ||||
| real(kind=wp) | :: | a | ||||
| real(kind=wp), | dimension(251) | :: | Fc |
Compute modified spherical Bessel functions of the first kind, in(x) and in'(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n) | :: | Si | |||
| real(kind=wp), | dimension(0:n) | :: | Di |
Compute parabolic cylinder functions W(a,±x) and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | a | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | W1f | ||||
| real(kind=wp) | :: | W1d | ||||
| real(kind=wp) | :: | W2f | ||||
| real(kind=wp) | :: | W2d |
Compute prolate and oblate spheroidal radial functions of the first kind for given m, n, c and x
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(200) | :: | Df | |||
| integer | :: | Kd | ||||
| real(kind=wp) | :: | R1f | ||||
| real(kind=wp) | :: | R1d |
Compute parabolic cylinder function Dv(x) for small argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | Va | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Pd |
Compute complex exponential integral E1(z)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=wp) | :: | z | ||||
| complex(kind=wp) | :: | Ce1 |
Integrate Bessel functions J0(t) and Y0(t) with respect to t from 0 to x ( x ≥ 0 )
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Tj | ||||
| real(kind=wp) | :: | Ty |
Compute the confluent hypergeometric function U(a,b,x) for large argument x
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | a | ||||
| real(kind=wp) | :: | b | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Hu | ||||
| integer | :: | Id |
Compute gmn(-ic,ix) and its derivative for oblate radial functions with a small argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(200) | :: | Bk | |||
| real(kind=wp) | :: | Gf | ||||
| real(kind=wp) | :: | Gd |
Integrate Bessel functions J0(t) & Y0(t) with respect to t from 0 to x
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Tj | ||||
| real(kind=wp) | :: | Ty |
Compute Riccati-Bessel functions of the second kind and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n) | :: | Ry | |||
| real(kind=wp), | dimension(0:n) | :: | Dy |
Compute Legendre polynomials Pn(x), Pn'(x) and the integral of Pn(t) from 0 to x
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(0:n) | :: | Pn | |||
| real(kind=wp), | dimension(0:n) | :: | Pd | |||
| real(kind=wp), | dimension(0:n) | :: | Pl |
Compute Kelvin functions ber x, bei x, ker x and kei x, and their derivatives ( x > 0 )
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Ber | ||||
| real(kind=wp) | :: | Bei | ||||
| real(kind=wp) | :: | Ger | ||||
| real(kind=wp) | :: | Gei | ||||
| real(kind=wp) | :: | Der | ||||
| real(kind=wp) | :: | Dei | ||||
| real(kind=wp) | :: | Her | ||||
| real(kind=wp) | :: | Hei |
Compute confluent hypergeometric function U(a,b,x) with integer b ( b = ±1,±2,... )
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | a | ||||
| real(kind=wp) | :: | b | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Hu | ||||
| integer | :: | Id |
Compute the complex zeros of Y0(z), Y1(z) and Y1'(z), and their associated values at the zeros using the modified Newton's iteration method
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Nt | ||||
| integer | :: | Kf | ||||
| integer | :: | Kc | ||||
| complex(kind=wp), | dimension(nt) | :: | Zo | |||
| complex(kind=wp), | dimension(nt) | :: | Zv |
Compute Kelvin functions ber x, bei x, ker x and kei x, and their derivatives ( x > 0 )
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Ber | ||||
| real(kind=wp) | :: | Bei | ||||
| real(kind=wp) | :: | Ger | ||||
| real(kind=wp) | :: | Gei | ||||
| real(kind=wp) | :: | Der | ||||
| real(kind=wp) | :: | Dei | ||||
| real(kind=wp) | :: | Her | ||||
| real(kind=wp) | :: | Hei |
Compute oblate radial functions of the second kind with a small argument, Rmn(-ic,ix) & Rmn'(-ic,ix)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Cv | ||||
| real(kind=wp), | dimension(200) | :: | Df | |||
| integer | :: | Kd | ||||
| real(kind=wp) | :: | R2f | ||||
| real(kind=wp) | :: | R2d |
Compute Bessel functions Jn(x) and their first and second derivatives ( n= 0,1,… )
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(101) | :: | Bj | |||
| real(kind=wp), | dimension(101) | :: | Dj | |||
| real(kind=wp), | dimension(101) | :: | Fj |
Compute spherical Bessel functions jn(x) and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n) | :: | Sj | |||
| real(kind=wp), | dimension(0:n) | :: | Dj |
Compute orthogonal polynomials: Tn(x) or Un(x), or Ln(x) or Hn(x), and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Kf | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(0:n) | :: | Pl | |||
| real(kind=wp), | dimension(0:n) | :: | Dpl |
Compute the zeros of Kelvin functions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Nt | ||||
| integer | :: | Kd | ||||
| real(kind=wp), | dimension(nt) | :: | Zo |
Compute oblate radial functions of the first and second kinds, and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Cv | ||||
| integer | :: | Kf | ||||
| real(kind=wp) | :: | R1f | ||||
| real(kind=wp) | :: | R1d | ||||
| real(kind=wp) | :: | R2f | ||||
| real(kind=wp) | :: | R2d |
Compute Hankel functions of the first and second kinds and their derivatives for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| complex(kind=wp) | :: | z | ||||
| integer | :: | Nm | ||||
| complex(kind=wp), | dimension(0:n) | :: | Chf1 | |||
| complex(kind=wp), | dimension(0:n) | :: | Chd1 | |||
| complex(kind=wp), | dimension(0:n) | :: | Chf2 | |||
| complex(kind=wp), | dimension(0:n) | :: | Chd2 |
Compute the zeros of Bessel functions Jn(x), Yn(x), and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| integer | :: | Nt | ||||
| real(kind=wp), | dimension(nt) | :: | Rj0 | |||
| real(kind=wp), | dimension(nt) | :: | Rj1 | |||
| real(kind=wp), | dimension(nt) | :: | Ry0 | |||
| real(kind=wp), | dimension(nt) | :: | Ry1 |
Compute modified Bessel functions Iv(x) and Kv(x), and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | v | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Vm | ||||
| real(kind=wp), | dimension(0:*) | :: | Bi | |||
| real(kind=wp), | dimension(0:*) | :: | Di | |||
| real(kind=wp), | dimension(0:*) | :: | Bk | |||
| real(kind=wp), | dimension(0:*) | :: | Dk |
Compute the expansion coefficients of the prolate and oblate spheroidal functions, dk
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | Cv | ||||
| integer | :: | Kd | ||||
| real(kind=wp), | dimension(200) | :: | Df |
Compute Bessel functions Jv(x) and Yv(x), and modified Bessel functions Iv(x) and Kv(x), and their derivatives with v=1/3,2/3
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Vj1 | ||||
| real(kind=wp) | :: | Vj2 | ||||
| real(kind=wp) | :: | Vy1 | ||||
| real(kind=wp) | :: | Vy2 | ||||
| real(kind=wp) | :: | Vi1 | ||||
| real(kind=wp) | :: | Vi2 | ||||
| real(kind=wp) | :: | Vk1 | ||||
| real(kind=wp) | :: | Vk2 |
Compute the modified Bessel functions Iv(z), Kv(z) and their derivatives for an arbitrary order and complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | v | ||||
| complex(kind=wp) | :: | z | ||||
| real(kind=wp) | :: | Vm | ||||
| complex(kind=wp), | dimension(0:*) | :: | Cbi | |||
| complex(kind=wp), | dimension(0:*) | :: | Cdi | |||
| complex(kind=wp), | dimension(0:*) | :: | Cbk | |||
| complex(kind=wp), | dimension(0:*) | :: | Cdk |
Compute the modified Bessel functions Iv(z), Kv(z) and their derivatives for an arbitrary order and complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | v | ||||
| complex(kind=wp) | :: | z | ||||
| real(kind=wp) | :: | Vm | ||||
| complex(kind=wp), | dimension(0:*) | :: | Cbi | |||
| complex(kind=wp), | dimension(0:*) | :: | Cdi | |||
| complex(kind=wp), | dimension(0:*) | :: | Cbk | |||
| complex(kind=wp), | dimension(0:*) | :: | Cdk |
Compute complex Fresnel integral C(z) and C'(z)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=wp) | :: | z | ||||
| complex(kind=wp) | :: | Zf | ||||
| complex(kind=wp) | :: | Zd |
Compute Fresnel integrals C(x) and S(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | c | ||||
| real(kind=wp) | :: | s |
Compute Riccati-Bessel functions of the first kind and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n) | :: | Rj | |||
| real(kind=wp), | dimension(0:n) | :: | Dj |
Compute the zeros of Hermite polynomial Ln(x) in the interval [-∞,∞], and the corresponding weighting coefficients for Gauss-Hermite integration
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp), | dimension(n) | :: | x | |||
| real(kind=wp), | dimension(n) | :: | w |
Compute Bessel functions J0(x), J1(x), Y0(x), Y1(x), and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Bj0 | ||||
| real(kind=wp) | :: | Dj0 | ||||
| real(kind=wp) | :: | Bj1 | ||||
| real(kind=wp) | :: | Dj1 | ||||
| real(kind=wp) | :: | By0 | ||||
| real(kind=wp) | :: | Dy0 | ||||
| real(kind=wp) | :: | By1 | ||||
| real(kind=wp) | :: | Dy1 |
Compute exponential integral En(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(0:n) | :: | En |
Compute modified spherical Bessel functions of the second kind, kn(x) and kn'(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n) | :: | Sk | |||
| real(kind=wp), | dimension(0:n) | :: | Dk |
Compute exponential integral En(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(0:n) | :: | En |
Compute gamma function Г(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | Ga |
Compute parabolic cylinder functions Vv(x) and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | v | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp), | dimension(0:*) | :: | Vv | |||
| real(kind=wp), | dimension(0:*) | :: | Vp | |||
| real(kind=wp) | :: | Pvf | ||||
| real(kind=wp) | :: | Pvd |
Compute the associated Legendre functions of the second kind, Qmn(z) and Qmn'(z), for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Mm | ||||
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | y | ||||
| complex(kind=wp), | dimension(0:mm,0:n) | :: | Cqm | |||
| complex(kind=wp), | dimension(0:mm,0:n) | :: | Cqd |
Compute the characteristic values of spheroidal wave functions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m | ||||
| integer | :: | n | ||||
| real(kind=wp) | :: | c | ||||
| integer | :: | Kd | ||||
| real(kind=wp) | :: | Cv | ||||
| real(kind=wp), | dimension(200) | :: | Eg |
Compute modified Bessel functions In(z) and Kn(z), and their derivatives for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| complex(kind=wp) | :: | z | ||||
| integer | :: | Nm | ||||
| complex(kind=wp), | dimension(0:n) | :: | Cbi | |||
| complex(kind=wp), | dimension(0:n) | :: | Cdi | |||
| complex(kind=wp), | dimension(0:n) | :: | Cbk | |||
| complex(kind=wp), | dimension(0:n) | :: | Cdk |
Compute modified Bessel functions In(z), Kn(x) and their derivatives for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| complex(kind=wp) | :: | z | ||||
| integer | :: | Nm | ||||
| complex(kind=wp), | dimension(0:n) | :: | Cbi | |||
| complex(kind=wp), | dimension(0:n) | :: | Cdi | |||
| complex(kind=wp), | dimension(0:n) | :: | Cbk | |||
| complex(kind=wp), | dimension(0:n) | :: | Cdk |
Compute modified Mathieu functions of the first and second kinds, Mcm(1)(2)(x,q) and Msm(1)(2)(x,q), and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | Kf | ||||
| integer | :: | Kc | ||||
| integer | :: | m | ||||
| real(kind=wp) | :: | q | ||||
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | F1r | ||||
| real(kind=wp) | :: | D1r | ||||
| real(kind=wp) | :: | F2r | ||||
| real(kind=wp) | :: | D2r |
Compute modified Bessel functions I0(z), I1(z), K0(z), K1(z), and their derivatives for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=wp) | :: | z | ||||
| complex(kind=wp) | :: | Cbi0 | ||||
| complex(kind=wp) | :: | Cdi0 | ||||
| complex(kind=wp) | :: | Cbi1 | ||||
| complex(kind=wp) | :: | Cdi1 | ||||
| complex(kind=wp) | :: | Cbk0 | ||||
| complex(kind=wp) | :: | Cdk0 | ||||
| complex(kind=wp) | :: | Cbk1 | ||||
| complex(kind=wp) | :: | Cdk1 |
Compute the psi function for a complex argument
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | x | ||||
| real(kind=wp) | :: | y | ||||
| real(kind=wp) | :: | Psr | ||||
| real(kind=wp) | :: | Psi |
Compute spherical Bessel functions yn(x) and their derivatives
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | n | ||||
| real(kind=wp) | :: | x | ||||
| integer | :: | Nm | ||||
| real(kind=wp), | dimension(0:n) | :: | Sy | |||
| real(kind=wp), | dimension(0:n) | :: | Dy |
Compute Jacobian elliptic functions sn u, cn u and dn u
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | u | ||||
| real(kind=wp) | :: | Hk | ||||
| real(kind=wp) | :: | Esn | ||||
| real(kind=wp) | :: | Ecn | ||||
| real(kind=wp) | :: | Edn | ||||
| real(kind=wp) | :: | Eph |