SF_SPECIAL
Description
SciFortran module for specific functions and distributions
Quick access
- Routines:
airya(),airyb(),airyzo(),ajyik(),aswfa(),aswfb(),bernoa(),bernob(),betaf(),bethe_guess_g0(),bethe_lattice(),bjndd(),cbk(),cchg(),cerf(),cerror(),cerzo(),cfc(),cfs(),cgama(),ch12n(),chgm(),chgu(),chgubi(),chguit(),chgul(),chgus(),cik01(),ciklv(),cikna(),ciknb(),cikva(),cikvb(),cisia(),cisib(),cjk(),cjy01(),cjylv(),cjyna(),cjynb(),cjyva(),cjyvb(),clpmn(),clpn(),clqmn(),clqn(),comelp(),cpbdn(),cpdla(),cpdsa(),cpsi(),csphik(),csphjy(),cv0(),cva1(),cva2(),cvf(),cvql(),cvqm(),cy01(),cyzo(),dens_2dsquare(),dens_3dcubic(),dens_bethe(),dens_hyperc(),dvla(),dvsa(),e1xa(),e1xb(),e1z(),eix(),elit(),elit3(),envj(),enxa(),enxb(),eulera(),eulerb(),fcoef(),fcs(),fcszo(),fermi(),ffk(),gaih(),gam0(),gammaf(),gfbethe(),gfbether(),gmn(),heaviside(),herzo(),hygfx(),hygfz(),ik01a(),ik01b(),ikna(),iknb(),ikv(),incob(),incog(),itairy(),itika(),itikb(),itjya(),itjyb(),itsh0(),itsl0(),itth0(),ittika(),ittikb(),ittjya(),ittjyb(),jdzo(),jelp(),jy01a(),jy01b(),jyna(),jynb(),jyndd(),jyv(),jyzo(),klvna(),klvnb(),klvnzo(),kmn(),lagzo(),lamn(),lamv(),legzo(),lgama(),lpmn(),lpmns(),lpmv(),lpn(),lpni(),lqmn(),lqmns(),lqna(),lqnb(),msta1(),msta2(),mtu0(),mtu12(),othpl(),pbdv(),pbvv(),pbwa(),qstar(),rctj(),rcty(),refine(),rmn1(),rmn2l(),rmn2so(),rmn2sp(),rswfo(),rswfp(),scka(),sckb(),sdmn(),segv(),sgn(),sphi(),sphj(),sphk(),sphy(),step(),stvh0(),stvh1(),stvhv(),stvl0(),stvl1(),stvlv(),vvla(),vvsa(),werror(),wfun(),zerf()
Used modules
sf_integrate: SciFortran module for function integration
Subroutines and functions
- interface sf_special/step(x, i, j[, origin])
This function returns the step function of a real number or of the comparison of two integers, as a real(8) number. The specific procedures cover a real argument
x(step_x), giving 1 for \(x>0\), 0 for \(x<0\) and, at the origin \(x=0\), the value selected byorigin, and two integer argumentsiandj(step_ij), giving 1 for \(i>j\), 0 for \(i<j\) and, at the origin \(i=j\), the value selected byorigin. Iforiginis true, which is the default, the step is 1 at the origin, otherwise it is 0. The functions are elemental (step_x) and pure (step_ij).- Parameters:
x [real, in] – real argument
i [integer, in] – first integer
j [integer, in] – second integer
- Options:
origin [logical, in] – if T (default) step(0)=1, else step(0)=0
- Result:
step [real]
- interface sf_special/sgn(x)
This function returns the sign of the integer (
i_sgn) or real(8) (d_sgn) numberx, evaluated asx/abs(x), hence -1 or 1. The value is undefined for \(x=0\), where it is a division by zero. The function is elemental.- Parameters:
x [integer/real, in] – number whose sign is returned
- Result:
sgn [integer/real]
- function sf_special/heaviside(x)
This function returns the Heaviside step function of the real argument
x: 0 for \(x<0\), 1/2 for \(x=0\) and 1 for \(x>0\). The function is elemental.- Parameters:
x [real, in] – real argument
- Result:
heaviside [real]
- function sf_special/fermi(x, beta[, limit])
This function returns the Fermi-Dirac distribution \(f(x) = 1/(1+e^{\beta x})\), with
xthe energy measured from the chemical potential andbetathe inverse temperature. To avoid overflows it is set to 1 for \(\beta x < -limit\) and to 0 for \(\beta x > limit\), withlimitequal to 200 by default (the absolute value oflimitis used). The function is elemental.- Parameters:
x [real, in] – energy, measured from the chemical potential
beta [real, in] – inverse temperature
- Options:
limit [real, in] – cutoff on \(|beta*x|\) to avoid overflows (default 200)
- Result:
fermi [real]
- function sf_special/wfun(z)
This function returns the Faddeeva function \(w(z) = e^{-z^2}\,\mathrm{erfc}(-iz)\), i.e. the complex error function, of the complex argument
z, evaluated with the routineWOFZ. The result is built with a default-kindcmplxcall, so it is accurate only to single precision: usezerfinstead.- Parameters:
z [complex] – complex argument
- Result:
wfun [complex]
- function sf_special/zerf(z)
This function returns the error function \(\mathrm{erf}(z)\) of the complex argument
z, computed as \(1 - w(iz)\,e^{-z^2}\), with \(w\) the Faddeeva function. This is evaluated with a modified version of the algorithm 680 of G.P.M. Poppe and C.M.J. Wijers (ACM Trans. Math. Software 16, 1990), rewritten in Fortran 2008. The accuracy of \(w(z)\) is 14 significant digits in the first and second quadrants and 13 in the third and fourth ones, outside a circular region of radius 0.126 around a zero of the function. The function is elemental.- Parameters:
z [complex, in]
- Result:
zerf [complex]
- subroutine sf_special/bethe_lattice(dos, ome, lk[, d])
This subroutine builds the Bethe lattice structure of the problem: the energy grid
omeofLkequally spaced points from \(-D\) to \(D\), and the density of states times the energy step on that grid,dos(i) = dens_bethe(ome(i),D)*de, withde = 2D/(Lk-1). The density of statesdos/deis also written, as two columns energy and density, in the fileDOSbethe.lattice, and a message is printed. Note that the energy step is computed withDitself, soDhas to be always passed, although it is declared optional.- Parameters:
dos (lk) [real]
ome (lk) [real]
- Options:
lk [integer]
d [real]
- function sf_special/dens_bethe(x[, d])
This function returns the density of states of the Bethe lattice with half bandwidth
D(default 1) at the energyx: \(\rho(x) = \frac{2}{\pi D}\sqrt{1-(x/D)^2}\). It is zero outside the band \(|x|>D\). The function is elemental.- Parameters:
x [real, in]
- Options:
d [real, in]
- Result:
dens_bethe [real]
- function sf_special/gfbethe(w, zeta, d)
This function returns the Hilbert transform of the Bethe density of states with half bandwidth
dat the complex energyzeta, i.e. the local Green’s function \(G(\zeta) = 2/(\zeta + s\sqrt{\zeta^2-d^2})\). The sign \(s\) selects the branch of the square root and it is fixed by the sign ofwtimes the imaginary part of the root, withwthe real frequency. The function is elemental.- Parameters:
w [real, in]
zeta [complex, in]
d [real, in]
- Result:
gfbethe [complex]
- function sf_special/gfbether(w, zeta, d)
This function returns the Hilbert transform of the Bethe density of states with half bandwidth
dat the complex energyzeta, i.e. the local Green’s function \(G(\zeta) = 2/(\zeta + s\sqrt{\zeta^2-d^2})\), asgfbethe, but the sign \(s\) selecting the branch of the square root is the sign of the real part ofzeta. The argumentwis not used. If the real part ofzetais zero it is replaced by1d-8, sozetais modified.- Parameters:
w [real]
zeta [complex]
d [real]
- Result:
gfbether [complex]
- subroutine sf_special/bethe_guess_g0(g0, d, beta, hloc)
This subroutine returns in
g0a guess of the non-interacting local Green’s function of the Bethe lattice with half bandwidthdat the inverse temperaturebeta, on the firstsize(g0)positive Matsubara frequencies \(\omega_n = \pi(2n-1)/\beta\):g0(n) = gfbethe(\(\omega_n\), i\(\omega_n\):code:` - hloc, d)`, wherehlocis the local energy level.- Parameters:
g0 (•) [complex]
d [real]
beta [real]
hloc [real]
- function sf_special/dens_hyperc(x[, t1])
This function returns the density of states of a hypercubic lattice in infinite dimensions, a Gaussian of standard deviation
t1: \(\rho(x) = \frac{1}{t_1\sqrt{2\pi}}\, e^{-x^2/(2 t_1^2)}\), wherexis the energy. The default is \(t_1=\sqrt{2}\). The function is pure.- Parameters:
x [real, in] – energy
- Options:
t1 [real, in] – standard deviation of the Gaussian (default sqrt(2))
- Result:
dens_hyperc [real]
- function sf_special/dens_2dsquare(x[, ts])
This function returns the density of states at the energy
xof the 2-dimensional square lattice with nearest-neighbour hoppingts(default 1): \(\rho(x) = \frac{2}{\pi^2 W} K\left(\sqrt{1-(x/W)^2}\right)\), with \(W = 4 t_s\) the half bandwidth and \(K\) the complete elliptic integral of the first kind. It is zero outside the band \(|x|>W\) and has a logarithmic van Hove singularity at \(x=0\).- Parameters:
x [real, in] – energy
- Options:
ts [real, in] – nearest-neighbour hopping (default 1)
- Result:
dos [real]
- function sf_special/dens_3dcubic(x[, ts])
This function returns the density of states at the energy
xof the 3-dimensional simple cubic lattice with nearest-neighbour hoppingts(default 1), following Economou, Green’s functions in quantum physics, and Horiguchi, Journal of the Physical Society of Japan 30 (5), 1971. It is evaluated as a one-dimensional integral of the complete elliptic integral of the first kind, with the adaptive quadraturequad. It is zero outside the band \(|x|>W\), with \(W = 6 t_s\) the half bandwidth.- Parameters:
x [real, in] – energy
- Options:
ts [real] – nearest-neighbour hopping (default 1)
- Result:
dos [real]
- subroutine sf_special/airya(x, ai, bi, ad, bd)
AIRYA computes Airy functions and their derivatives.
Original FORTRAN77 version by Shanjie Zhang, Jianming Jin. FORTRAN90 version by John Burkardt. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument of the Airy function
ai [real] – out: Ai(x)
bi [real] – out: Bi(x)
ad [real] – out: Ai’(x)
bd [real] – out: Bi’(x)
- subroutine sf_special/airyb(x, ai, bi, ad, bd)
AIRYB computes Airy functions and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: argument of Airy function
ai [real] – out: Ai(x)
bi [real] – out: Bi(x)
ad [real] – out: Ai’(x)
bd [real] – out: Bi’(x)
- subroutine sf_special/airyzo(nt, kf, xa, xb, xc, xd)
AIRYZO computes the first NT zeros of Ai(x) and Ai’(x).
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).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
nt [integer] – in: the number of zeros
- Parameters:
kf [integer] – in: the function code. 1 for Ai(x) and Ai’(x); 2 for Bi(x) and Bi’(x)
xa (nt) [real] – out: a, the m-th zero of Ai(x) or b, the m-th zero of Bi(x)
xb (nt) [real] – out: a’, the m-th zero of Ai’(x) or b’, the m-th zero of Bi’(x)
xc (nt) [real] – out: Ai(a’) or Bi(b’)
xd (nt) [real] – out: Ai’(a) or Bi’(b)
- subroutine sf_special/ajyik(x, vj1, vj2, vy1, vy2, vi1, vi2, vk1, vk2)
AJYIK computes Bessel functions Jv(x), Yv(x), Iv(x), Kv(x).
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.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument. X should not be zero
vj1 [real] – out: J1/3(x)
vj2 [real] – out: J2/3(x)
vy1 [real] – out: Y1/3(x)
vy2 [real] – out: Y2/3(x)
vi1 [real] – out: I1/3(x)
vi2 [real] – out: I2/3(x)
vk1 [real] – out: K1/3(x)
vk2 [real] – out: K2/3(x)
- subroutine sf_special/aswfa(m, n, c, x, kd, cv, s1f, s1d)
ASWFA: prolate and oblate spheroidal angular functions of the first kind.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter
n [integer] – in: the mode parameter, with N = M, M+1, …
c [real] – in: the spheroidal parameter
x [real] – in: the argument of the angular function. \(|X| < 1.0\)
kd [integer] – in: the function code. 1, the prolate function. -1, the oblate function
cv [real] – in: the characteristic value
s1f [real] – out: the angular function of the first kind
s1d [real] – out: its derivative
- subroutine sf_special/aswfb(m, n, c, x, kd, cv, s1f, s1d)
ASWFB: prolate and oblate spheroidal angular functions of the first kind.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter, m = 0, 1, 2, …
n [integer] – in: mode parameter, N = M, M+1, M+2, …
c [real] – in: the spheroidal parameter
x [real] – in: the argument, with \(|X| < 1.0\)
kd [integer] – in: the function code. 1, the prolate function. -1, the oblate function
cv [real] – in: the characteristic value
s1f [real] – out: the angular function of the first kind
s1d [real] – out: its derivative
- subroutine sf_special/bernoa(n, bn)
BERNOA computes the Bernoulli number Bn.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(bn, 0)] – in: the index
- Parameters:
bn (1 + n) [real] – out: the value of the N-th Bernoulli number
- subroutine sf_special/bernob(n, bn)
BERNOB computes the Bernoulli number Bn.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(bn, 0)] – in: the index
- Parameters:
bn (1 + n) [real] – out: the value of the N-th Bernoulli number
- subroutine sf_special/betaf(p, q, bt)
BETA computes the Beta function B(p,q).
Original FORTRAN77 version by Shanjie Zhang, Jianming Jin. FORTRAN90 version by John Burkardt. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
p [real] – in: the parameter P, 0 < P
q [real] – in: the parameter Q, 0 < Q
bt [real] – out: the value of B(P,Q)
- subroutine sf_special/bjndd(n, x, bj, dj, fj)
BJNDD computes Bessel functions Jn(x) and first and second derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(bj, 0)] – in: the order
- Parameters:
x [real] – in: the argument
bj (1 + n) [real] – out: Jn(x)
dj (1 + n) [real] – out: Jn’(x)
fj (1 + n) [real] – out: Jn’’(x) in the last entries
- subroutine sf_special/cbk(m, n, c, cv, qt, ck, bk)
CBK computes coefficients for oblate radial functions with small argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter; M = 0, 1, 2, …
n [integer] – in: mode parameter, N = M, M + 1, M + 2, …
c [real] – in: spheroidal parameter
cv [real] – in: the characteristic value
qt [real] – in: not documented in the original header
ck (200) [real] – in: not documented in the original header
bk (200) [real] – out: the coefficients
- subroutine sf_special/cchg(a, b, z, chg)
CCHG computes the confluent hypergeometric function.
This function computes the confluent hypergeometric function M(a,b,z) with real parameters a, b and complex argument z.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [real] – in: parameter A
b [real] – in: parameter B
z [complex] – in: the argument
chg [complex] – out: the value of M(a,b,z)
- subroutine sf_special/cerf(z, cer, cder)
CERF computes the error function and derivative for a complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
z [complex] – the argument
cer [complex] – out: erf(z)
cder [complex] – out: erf’(z)
- subroutine sf_special/cerror(z, cer)
CERROR computes the error function for a complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
z [complex] – in: the argument
cer [complex] – out: the function value
- subroutine sf_special/cerzo(nt, zo)
CERZO evaluates the complex zeros of the error function.
The modified Newton method is used.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
nt [integer] – in: the number of zeros
- Parameters:
zo (nt) [complex] – out: the zeros
- subroutine sf_special/cfc(z, zf, zd)
CFC computes the complex Fresnel integral C(z) and C’(z).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
z [complex] – in: the argument
zf [complex] – out: C(z)
zd [complex] – out: C’(z)
- subroutine sf_special/cfs(z, zf, zd)
CFS computes the complex Fresnel integral S(z) and S’(z).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
z [complex] – in: the argument
zf [complex] – out: S(z)
zd [complex] – out: S’(z)
- subroutine sf_special/cgama(x, y, kf, gr, gi)
CGAMA computes the Gamma function for complex argument.
This procedure computes the gamma function Gamma(z) or ln[Gamma(z)] for a complex argument
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the real part of the argument Z
y [real] – in: the imaginary part of the argument Z
kf [integer] – in: the function code. 0 for ln[Gamma(z)] 1 for Gamma(z)
gr [real] – out: the real part of the selected function
gi [real] – out: the imaginary part of the selected function
- subroutine sf_special/ch12n(n, z, nm, chf1, chd1, chf2, chd2)
CH12N computes Hankel functions of first and second kinds, complex argument.
Both the Hankel functions and their derivatives are computed.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(chf1, 0)] – in: the order of the functions
- Parameters:
z [complex] – in: the argument
nm [integer] – out: the highest order computed
chf1 (1 + n) [complex] – out: Hn(1)(z)
chd1 (1 + n) [complex] – out: Hn(1)’(z)
chf2 (1 + n) [complex] – out: Hn(2)(z)
chd2 (1 + n) [complex] – out: Hn(2)’(z)
- subroutine sf_special/chgm(a, b, x, hg)
CHGM computes the confluent hypergeometric function M(a,b,x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [real] – in: parameter A
b [real] – in: parameter B
x [real] – in: the argument
hg [real] – out: the value of M(a,b,x)
- subroutine sf_special/chgu(a, b, x, hu, md)
CHGU computes the confluent hypergeometric function U(a,b,x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [real] – in: parameter A
b [real] – in: parameter B
x [real] – in: the argument
hu [real] – out: U(a,b,x)
md [integer] – out: the method code
- subroutine sf_special/chgubi(a, b, x, hu, id)
CHGUBI: confluent hypergeometric function with integer argument B.
This procedure computes the confluent hypergeometric function U(a,b,x) with integer(4) b ( b = +/-1,+/-2,… )
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [real] – in: parameter A
b [real] – in: parameter B
x [real] – in: the argument
hu [real] – out: the value of U(a,b,x)
id [integer] – out: the estimated number of significant digits
- subroutine sf_special/chguit(a, b, x, hu, id)
CHGUIT computes the hypergeometric function using Gauss-Legendre integration.
This procedure computes the hypergeometric function U(a,b,x) by using Gaussian-Legendre integration (n = 60)
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [double_precision] – in: parameter A
b [double_precision] – in: parameter B
x [double_precision] – in: the argument
hu [double_precision] – out: U(a,b,z)
id [integer] – out: the estimated number of significant digits
- subroutine sf_special/chgul(a, b, x, hu, id)
CHGUL: confluent hypergeometric function U(a,b,x) for large argument X.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [real] – in: parameter A
b [real] – in: parameter B
x [real] – in: the argument
hu [real] – out: the value of U(a,b,x)
id [integer] – out: the estimated number of significant digits
- subroutine sf_special/chgus(a, b, x, hu, id)
CHGUS: confluent hypergeometric function U(a,b,x) for small argument X.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [real] – in: parameter A
b [real] – in: parameter B
x [real] – in: the argument
hu [real] – out: U(a,b,x)
id [integer] – out: the estimated number of significant digits
- subroutine sf_special/cik01(z, cbi0, cdi0, cbi1, cdi1, cbk0, cdk0, cbk1, cdk1)
CIK01: modified Bessel I0(z), I1(z), K0(z) and K1(z) for complex argument.
This procedure computes the modified Bessel functions I0(z), I1(z), K0(z), K1(z), and their derivatives for a complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
z [complex] – in: the argument
cbi0 [complex] – out: I0(z)
cdi0 [complex] – out: I0’(z)
cbi1 [complex] – out: I1(z)
cdi1 [complex] – out: I1’(z)
cbk0 [complex] – out: K0(z)
cdk0 [complex] – out: K0’(z)
cbk1 [complex] – out: K1(z)
cdk1 [complex] – and K1’(z)
- subroutine sf_special/ciklv(v, z, cbiv, cdiv, cbkv, cdkv)
CIKLV: modified Bessel functions Iv(z), Kv(z), complex argument, large order.
This procedure computes modified Bessel functions Iv(z) and Kv(z) and their derivatives with a complex argument and a large order.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order of Iv(z) and Kv(z)
z [complex] – in: the argument
cbiv [complex] – out: Iv(z)
cdiv [complex] – out: Iv’(z)
cbkv [complex] – out: Kv(z)
cdkv [complex] – out: Kv’(z)
- subroutine sf_special/cikna(n, z, nm, cbi, cdi, cbk, cdk)
CIKNA: modified Bessel functions In(z), Kn(z), derivatives, complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(cbi, 0)] – in: the order of In(z) and Kn(z)
- Parameters:
z [complex] – in: the argument
nm [integer] – out: the highest order computed
cbi (1 + n) [complex] – In(z), n=0,…,N
cdi (1 + n) [complex] – In’(z), n=0,…,N
cbk (1 + n) [complex] – Kn(z), n=0,…,N
cdk (1 + n) [complex] – Kn’(z), n=0,…,N
- subroutine sf_special/ciknb(n, z, nm, cbi, cdi, cbk, cdk)
CIKNB computes complex modified Bessel functions In(z) and Kn(z).
This procedure also evaluates the derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(cbi, 0)] – in: the order of In(z) and Kn(z)
- Parameters:
z [complex] – in: the argument
nm [integer] – out: the highest order computed
cbi (1 + n) [complex] – In(z), n=0,…,N
cdi (1 + n) [complex] – In’(z), n=0,…,N
cbk (1 + n) [complex] – Kn(z), n=0,…,N
cdk (1 + n) [complex] – Kn’(z), n=0,…,N
- subroutine sf_special/cikva(v, z, vm, cbi, cdi, cbk, cdk)
CIKVA: modified Bessel functions Iv(z), Kv(z), arbitrary order, complex.
Compute the modified Bessel functions Iv(z), Kv(z) and their derivatives for an arbitrary order and complex argument
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order of the functions
z [complex] – in: the argument
vm [real] – out: the highest order computed
cbi (·) [complex] – out: In+v0(z)
cdi (·) [complex] – out: In+v0’(z)
cbk (·) [complex] – out: Kn+v0(z)
cdk (·) [complex] – out: Kn+v0’(z)
- subroutine sf_special/cikvb(v, z, vm, cbi, cdi, cbk, cdk)
CIKVB: modified Bessel functions,Iv(z), Kv(z), arbitrary order, complex.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order of the functions
z [complex] – in: the argument
vm [real] – out: the highest order computed
cbi (·) [complex] – out: In+v0(z)
cdi (·) [complex] – out: In+v0’(z)
cbk (·) [complex] – out: Kn+v0(z)
cdk (·) [complex] – out: Kn+v0’(z)
- subroutine sf_special/cisia(x, ci, si)
CISIA computes cosine Ci(x) and sine integrals Si(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument of Ci(x) and Si(x)
ci [real] – out: Ci(x)
si [real] – out: Si(x)
- subroutine sf_special/cisib(x, ci, si)
CISIB computes cosine and sine integrals.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument of Ci(x) and Si(x)
ci [real] – out: Ci(x)
si [real] – out: Si(x)
- subroutine sf_special/cjk(km, a)
CJK: asymptotic expansion coefficients for Bessel functions of large order.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
A: the value of Cj(k) where j and k are related to L by L = j+1+[k*(k+1)]/2; j, k = 0, 1, …, Km
- Parameters:
km [integer] – in: the maximum value of K
a (·) [real] – out: Cj(k), at L = j+1+k(k+1)/2, j,k = 0,1,…,Km
- subroutine sf_special/cjy01(z, cbj0, cdj0, cbj1, cdj1, cby0, cdy0, cby1, cdy1)
CJY01: complexBessel functions, derivatives, J0(z), J1(z), Y0(z), Y1(z).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
z [complex] – in: the argument
cbj0 [complex] – out: J0(z)
cdj0 [complex] – out: J0’(z)
cbj1 [complex] – out: J1(z)
cdj1 [complex] – out: J1’(z)
cby0 [complex] – out: Y0(z)
cdy0 [complex] – out: Y0’(z)
cby1 [complex] – out: Y1(z)
cdy1 [complex] – Y1’(z)
- subroutine sf_special/cjylv(v, z, cbjv, cdjv, cbyv, cdyv)
CJYLV: Bessel functions Jv(z), Yv(z) of complex argument and large order v.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order of Jv(z) and Yv(z)
z [complex] – in: the argument
cbjv [complex] – out: Jv(z)
cdjv [complex] – out: Jv’(z)
cbyv [complex] – out: Yv(z)
cdyv [complex] – out: Yv’(z)
- subroutine sf_special/cjyna(n, z, nm, cbj, cdj, cby, cdy)
CJYNA: Bessel functions and derivatives, Jn(z) and Yn(z) of complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(cbj, 0)] – in: the order of Jn(z) and Yn(z)
- Parameters:
z [complex] – in: the argument of Jn(z) and Yn(z)
nm [integer] – out: the highest order computed
cbj (1 + n) [complex] – out: Jn(z), n=0,…,N
cdj (1 + n) [complex] – out: Jn’(z), n=0,…,N
cby (1 + n) [complex] – out: Yn(z), n=0,…,N
cdy (1 + n) [complex] – out: Yn’(z), n=0,…,N
- subroutine sf_special/cjynb(n, z, nm, cbj, cdj, cby, cdy)
CJYNB: Bessel functions, derivatives, Jn(z) and Yn(z) of complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(cbj, 0)] – in: the order of Jn(z) and Yn(z)
- Parameters:
z [complex] – in: the argument of Jn(z) and Yn(z)
nm [integer] – out: the highest order computed
cbj (1 + n) [complex] – out: Jn(z)
cdj (1 + n) [complex] – out: Jn’(z)
cby (1 + n) [complex] – out: Yn(z)
cdy (1 + n) [complex] – out: Yn’(z)
- subroutine sf_special/cjyva(v, z, vm, cbj, cdj, cby, cdy)
CJYVA: Bessel functions and derivatives, Jv(z) and Yv(z) of complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order of Jv(z) and Yv(z)
z [complex] – the argument
vm [real] – out: the highest order computed
cbj (·) [complex] – out: Jn+v0(z)
cdj (·) [complex] – out: Jn+v0’(z)
cby (·) [complex] – out: Yn+v0(z)
cdy (·) [complex] – out: Yn+v0’(z)
- subroutine sf_special/cjyvb(v, z, vm, cbj, cdj, cby, cdy)
CJYVB: Bessel functions and derivatives, Jv(z) and Yv(z) of complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order of Jv(z) and Yv(z)
z [complex] – in: the argument
vm [real] – out: the highest order computed
cbj (·) [complex] – out: Jn+v0(z)
cdj (·) [complex] – out: Jn+v0’(z)
cby (·) [complex] – out: Yn+v0(z)
cdy (·) [complex] – out: Yn+v0’(z)
- subroutine sf_special/clpmn(mm, m, n, x, y, cpm, cpd)
CLPMN: associated Legendre functions and derivatives for complex argument.
Compute the associated Legendre functions Pmn(z) and their derivatives Pmn’(z) for a complex argument
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
mm [integer, optional,default=-1 + shape(cpm, 0)] – in: the physical dimension of CPM and CPD
n [integer, optional,default=-1 + shape(cpm, 1)] – in: the degree of Pmn(z)
- Parameters:
m [integer] – in: the order of Pmn(z)
x [real] – in: the real part of the argument Z
y [real] – in: the imaginary part of the argument Z
cpm (1 + mm, 1 + n) [complex] – out: Pmn(z)
cpd (1 + mm, 1 + n) [complex] – out: Pmn’(z)
- subroutine sf_special/clpn(n, x, y, cpn, cpd)
CLPN computes Legendre functions and derivatives for complex argument.
Compute Legendre polynomials Pn(z) and their derivatives Pn’(z) for a complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(cpn, 0)] – in: the degree
- Parameters:
x [real] – in: the real part of the argument
y [real] – in: the imaginary part of the argument
cpn (1 + n) [complex] – out: Pn(z)
cpd (1 + n) [complex] – out: Pn’(z)
- subroutine sf_special/clqmn(mm, m, n, x, y, cqm, cqd)
CLQMN: associated Legendre functions and derivatives for complex argument.
This procedure computes the associated Legendre functions of the second kind, Qmn(z) and Qmn’(z), for a complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
mm [integer, optional,default=-1 + shape(cqm, 0)] – in: the physical dimension of CQM and CQD
n [integer, optional,default=-1 + shape(cqm, 1)] – in: the degree of Qmn(z)
- Parameters:
m [integer] – in: the order of Qmn(z)
x [real] – in: the real part of the argument Z
y [real] – in: the imaginary part of the argument Z
cqm (1 + mm, 1 + n) [complex] – out: Qmn(z)
cqd (1 + mm, 1 + n) [complex] – out: Qmn’(z)
- subroutine sf_special/clqn(n, x, y, cqn, cqd)
CLQN: Legendre function Qn(z) and derivative Wn’(z) for complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(cqn, 0)] – in: the degree of Qn(z)
- Parameters:
x [real] – in: the real part of the argument Z
y [real] – in: the imaginary part of the argument Z
cqn (1 + n) [complex] – out: Qn(z)
cqd (1 + n) [complex] – out: Qn’(z
- subroutine sf_special/comelp(hk, ck, ce)
COMELP computes complete elliptic integrals K(k) and E(k).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
hk [real] – in: the modulus. 0 <= HK <= 1
ck [real] – out: K(HK)
ce [real] – out: E(HK)
- subroutine sf_special/cpbdn(n, z, cpb, cpd)
CPBDN: parabolic cylinder function Dn(z) and Dn’(z) for complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(cpb, 0)] – in: the order
- Parameters:
z [complex] – in: the argument
cpb (1 + n) [complex] – out: Dn(z)
cpd (1 + n) [complex] – out: Dn’(z)
- subroutine sf_special/cpdla(n, z, cdn)
CPDLA computes complex parabolic cylinder function Dn(z) for large argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
n [integer] – in: the order
z [complex] – in: the argument
cdn [complex] – out: the function value
- subroutine sf_special/cpdsa(n, z, cdn)
CPDSA computes complex parabolic cylinder function Dn(z) for small argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
n [integer] – in: the order
z [complex] – in: the argument
cdn [complex] – out: the value of DN(z)
- subroutine sf_special/cpsi(x, y, psr, psi)
CPSI computes the psi function for a complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the real part of the argument
y [real] – in: the imaginary part of the argument
psr [real] – out: the real part of the function value
psi [real] – out: the imaginary part of the function value
- subroutine sf_special/csphik(n, z, nm, csi, cdi, csk, cdk)
CSPHIK: complex modified spherical Bessel functions and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(csi, 0)] – in: the order of in(z) and kn(z)
- Parameters:
z [complex] – in: the argument
nm [integer] – out: the highest order computed
csi (1 + n) [complex] – out: in(z)
cdi (1 + n) [complex] – out: in’(z)
csk (1 + n) [complex] – out: kn(z)
cdk (1 + n) [complex] – out: kn’(z)
- subroutine sf_special/csphjy(n, z, nm, csj, cdj, csy, cdy)
CSPHJY: spherical Bessel functions jn(z) and yn(z) for complex argument.
This procedure computes spherical Bessel functions jn(z) and yn(z) and their derivatives for a complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(csj, 0)] – in: the order of jn(z) and yn(z)
- Parameters:
z [complex] – in: the argument
nm [integer] – out: the highest order computed
csj (1 + n) [complex] – jn(z), n=0,…,N
cdj (1 + n) [complex] – jn’(z), n=0,…,N
csy (1 + n) [complex] – yn(z), n=0,…,N
cdy (1 + n) [complex] – yn’(z), n=0,…,N
- subroutine sf_special/cv0(kd, m, q, a0)
CV0 computes the initial characteristic value of Mathieu functions.
This procedure computes the initial characteristic value of Mathieu functions for m <= 12 or q <= 300 or q <= m*m.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KD: the case code: 1, for cem(x,q) ( m = 0,2,4,…) 2, for cem(x,q) ( m = 1,3,5,…) 3, for sem(x,q) ( m = 1,3,5,…) 4, for sem(x,q) ( m = 2,4,6,…)
- Parameters:
kd [integer] – in: case code: 1 cem (m=0,2,4,..), 2 cem (m=1,3,5,..), 3 sem (m=1,3,5,..), 4 sem (m=2,4,6,..)
m [integer] – in: the order of the functions
q [real] – in: the parameter of the functions
a0 [real] – out: the characteristic value
- subroutine sf_special/cva1(kd, m, q, cv)
CVA1 computes a sequence of characteristic values of Mathieu functions.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KD: the case code. 1, for cem(x,q) ( m = 0,2,4,… ) 2, for cem(x,q) ( m = 1,3,5,… ) 3, for sem(x,q) ( m = 1,3,5,… ) 4, for sem(x,q) ( m = 2,4,6,… )
CV: characteristic values. For KD = 1, CV(1), CV(2), CV(3), …, correspond to the characteristic values of cem for m = 0, 2, 4, … For KD = 2, CV(1), CV(2), CV(3), …, correspond to the characteristic values of cem for m = 1, 3, 5, … For KD = 3, CV(1), CV(2), CV(3), …, correspond to the characteristic values of sem for m = 1, 3, 5, … For KD = 4, CV(1), CV(2), CV(3), …, correspond to the characteristic values of sem for m = 0, 2, 4, …
- Parameters:
kd [integer] – in: case code: 1 cem (m=0,2,4,..), 2 cem (m=1,3,5,..), 3 sem (m=1,3,5,..), 4 sem (m=2,4,6,..)
m [integer] – in: the maximum order of the Mathieu functions
q [real] – in: the parameter of the Mathieu functions
cv (200) [real] – out: characteristic values: for KD=1,2,3,4 the cem (m even, odd) and sem (m odd, even) series
- subroutine sf_special/cva2(kd, m, q, a)
CVA2 computes a specific characteristic value of Mathieu functions.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KD: the case code: 1, for cem(x,q) ( m = 0,2,4,…) 2, for cem(x,q) ( m = 1,3,5,…) 3, for sem(x,q) ( m = 1,3,5,…) 4, for sem(x,q) ( m = 2,4,6,…)
- Parameters:
kd [integer] – in: case code: 1 cem (m=0,2,4,..), 2 cem (m=1,3,5,..), 3 sem (m=1,3,5,..), 4 sem (m=2,4,6,..)
m [integer] – in: the order of the Mathieu functions
q [real] – in: the parameter of the Mathieu functions
a [real] – out: the characteristic value
- subroutine sf_special/cvf(kd, m, q, a, mj, f)
CVF computes F for the characteristic equation of Mathieu functions.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KD: the case code: 1, for cem(x,q) ( m = 0,2,4,…) 2, for cem(x,q) ( m = 1,3,5,…) 3, for sem(x,q) ( m = 1,3,5,…) 4, for sem(x,q) ( m = 2,4,6,…)
- Parameters:
kd [integer] – in: case code: 1 cem (m=0,2,4,..), 2 cem (m=1,3,5,..), 3 sem (m=1,3,5,..), 4 sem (m=2,4,6,..)
m [integer] – in: the order of the Mathieu functions
q [real] – in: the parameter of the Mathieu functions
a [real] – in: the characteristic value
mj [integer] – in: not documented in the original header
f [real] – out: the value of the function for the characteristic equation
- subroutine sf_special/cvql(kd, m, q, a0)
CVQL computes the characteristic value of Mathieu functions for q <= 3*m.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KD: the case code: 1, for cem(x,q) ( m = 0,2,4,…) 2, for cem(x,q) ( m = 1,3,5,…) 3, for sem(x,q) ( m = 1,3,5,…) 4, for sem(x,q) ( m = 2,4,6,…)
- Parameters:
kd [integer] – in: case code: 1 cem (m=0,2,4,..), 2 cem (m=1,3,5,..), 3 sem (m=1,3,5,..), 4 sem (m=2,4,6,..)
m [integer] – in: the order of the Mathieu functions
q [real] – in: the parameter value
a0 [real] – out: the initial characteristic value
- subroutine sf_special/cvqm(m, q, a0)
CVQM computes the characteristic value of Mathieu functions for q <= m*m.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the order of the Mathieu functions
q [real] – in: the parameter value
a0 [real] – out: the initial characteristic value
- subroutine sf_special/cy01(kf, z, zf, zd)
CY01 computes complex Bessel functions Y0(z) and Y1(z) and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KF: the function choice. 0 for ZF = Y0(z) and ZD = Y0’(z); 1 for ZF = Y1(z) and ZD = Y1’(z); 2 for ZF = Y1’(z) and ZD = Y1’’(z)
- Parameters:
kf [integer] – in: function choice: 0 for Y0, 1 for Y1, 2 for Y1’ (ZF the function, ZD its derivative)
z [complex] – in: the argument
zf [complex] – out: the requested function
zd [complex] – out: derivative
- subroutine sf_special/cyzo(nt, kf, kc, zo, zv)
CYZO computes zeros of complex Bessel functions Y0(z) and Y1(z) and Y1’(z).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KF: the function choice. 0 for Y0(z) and Y1(z0); 1 for Y1(z) and Y0(z1); 2 for Y1’(z) and Y1(z1’)
ZO, ZV: the zeros of Y0(z) or Y1(z) or Y1’(z), and the value of Y0’(z) or Y1’(z) or Y1(z) at the L-th zero
- Options:
nt [integer] – in: the number of zeros
- Parameters:
kf [integer] – in: function choice: 0 for Y0(z) and Y1(z0), 1 for Y1(z) and Y0(z1), 2 for Y1’(z) and Y1(z1’)
kc [integer] – in: complex/real choice. 0, for complex roots; 1, for real roots
zo (nt) [complex] – out: the zeros of Y0(z), Y1(z) or Y1’(z)
zv (nt) [complex] – out: the value of Y0’(z), Y1’(z) or Y1(z) at the L-th zero
- subroutine sf_special/dvla(va, x, pd)
DVLA computes parabolic cylinder functions Dv(x) for large argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
va [real] – in: the order
x [real] – in: the argument
pd [real] – out: the function value
- subroutine sf_special/dvsa(va, x, pd)
DVSA computes parabolic cylinder functions Dv(x) for small argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
va [real] – in: the order
x [real] – in: the argument
pd [real] – out: the function value
- subroutine sf_special/e1xa(x, e1)
E1XA computes the exponential integral E1(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
e1 [real] – out: the function value
- subroutine sf_special/e1xb(x, e1)
E1XB computes the exponential integral E1(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
e1 [real] – out: the function value
- subroutine sf_special/e1z(z, ce1)
E1Z computes the complex exponential integral E1(z).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
z [complex] – in: the argument
ce1 [complex] – out: the function value
- subroutine sf_special/eix(x, ei)
EIX computes the exponential integral Ei(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
ei [real] – out: the function value
- subroutine sf_special/elit(hk, phi, fe, ee)
ELIT: complete and incomplete elliptic integrals F(k,phi) and E(k,phi).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
hk [real] – in: the modulus, between 0 and 1
phi [real] – in: the argument in degrees
fe [real] – out: F(k,phi)
ee [real] – out: E(k,phi)
- subroutine sf_special/elit3(phi, hk, c, el3)
ELIT3 computes the elliptic integral of the third kind.
Gauss-Legendre quadrature is used.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
phi [real] – in: the argument in degrees
hk [real] – in: the modulus, between 0 and 1
c [real] – in: the parameter, between 0 and 1
el3 [real] – out: the value of the elliptic integral of the third kind
- function sf_special/envj(n, x)
ENVJ is a utility function used by MSTA1 and MSTA2.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
n [integer] – in: the order
x [real] – in: the argument
- Result:
envj [real] – out: the value of the function
- subroutine sf_special/enxa(n, x, en)
ENXA computes the exponential integral En(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(en, 0)] – in: the order
- Parameters:
x [real] – in: the argument
en (1 + n) [real] – out: the function values
- subroutine sf_special/enxb(n, x, en)
ENXB computes the exponential integral En(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(en, 0)] – in: the order
- Parameters:
x [real] – in: the argument
en (1 + n) [real] – out: the function values
- subroutine sf_special/werror(x, err)
WERROR evaluates the error function.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
err [real] – out: the function value
- subroutine sf_special/eulera(n, en)
EULERA computes the Euler number En.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(en, 0)] – in: the index of the highest value to compute
- Parameters:
en (1 + n) [real] – out: the Euler numbers up to the N-th value
- subroutine sf_special/eulerb(n, en)
EULERB computes the Euler number En.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(en, 0)] – in: the index of the highest value to compute
- Parameters:
en (1 + n) [real] – out: the Euler numbers up to the N-th value
- subroutine sf_special/fcoef(kd, m, q, a, fc)
FCOEF: expansion coefficients for Mathieu and modified Mathieu functions.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KD: the case code. 1, for cem(x,q) ( m = 0,2,4,…) 2, for cem(x,q) ( m = 1,3,5,…) 3, for sem(x,q) ( m = 1,3,5,…) 4, for sem(x,q) ( m = 2,4,6,…)
FC: the expansion coefficients of Mathieu functions ( k = 1,2,…,KM ). FC(1), FC(2), FC(3), … correspond to A0, A2, A4, … for KD = 1 case, A1, A3, A5, … for KD = 2 case, B1, B3, B5, … for KD = 3 case, B2, B4, B6, … for KD = 4 case
- Parameters:
kd [integer] – in: case code: 1 cem (m=0,2,4,..), 2 cem (m=1,3,5,..), 3 sem (m=1,3,5,..), 4 sem (m=2,4,6,..)
m [integer] – in: the order of the Mathieu function
q [real] – in: the parameter of the Mathieu functions
a [real] – in: the characteristic value of the Mathieu functions for given m and q
fc (251) [real] – out: expansion coefficients of the Mathieu functions, k=1,…,KM
- subroutine sf_special/fcs(x, c, s)
FCS computes Fresnel integrals C(x) and S(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
c [real] – out: the Fresnel integral C(x)
s [real] – out: the Fresnel integral S(x)
- subroutine sf_special/fcszo(kf, nt, zo)
FCSZO computes complex zeros of Fresnel integrals C(x) or S(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
kf [integer] – in: the function code. 1 for C(z); 2 for S(z)
zo (nt) [complex] – the zeros
- Options:
nt [integer] – in: the total number of zeros desired
- subroutine sf_special/ffk(ks, x, fr, fi, fm, fa, gr, gi, gm, ga)
FFK computes modified Fresnel integrals F+/-(x) and K+/-(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
ks [integer] – in: the sign code. 0, to calculate F+(x) and K+(x); 1, to calculate F_(x) and K_(x)
x [real] – in: the argument
fr [real] – out: \(Re[F\pm(x)]\)
fi [real] – out: \(Im[F\pm(x)]\)
fm [real] – out: \(|F\pm(x)|\)
fa [real] – out: \(Arg[F\pm(x)]\) (Degs.)
gr [real] – out: \(Re[K\pm(x)]\)
gi [real] – out: \(Im[K\pm(x)]\)
gm [real] – out: \(|K\pm(x)|\)
ga [real] – out: \(Arg[K\pm(x)]\) (Degs.)
- subroutine sf_special/gaih(x, ga)
GAIH computes the GammaH function.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
ga [real] – out: the function value
- subroutine sf_special/gam0(x, ga)
GAM0 computes the Gamma function for the LAMV function.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
ga [real] – out: the function value
- subroutine sf_special/gammaf(x, ga)
GAMMA evaluates the Gamma function.
Original FORTRAN77 version by Shanjie Zhang, Jianming Jin. FORTRAN90 version by John Burkardt. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument, which must not be 0, or any negative integer
ga [real] – out: the value of the Gamma function
- subroutine sf_special/gmn(m, n, c, x, bk, gf, gd)
GMN computes quantities for oblate radial functions with small argument.
This procedure computes Gmn(-ic,ix) and its derivative for oblate radial functions with a small argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter; M = 0, 1, 2, …
n [integer] – in: mode parameter, N = M, M + 1, M + 2, …
c [real] – in: spheroidal parameter
x [real] – in: the argument
bk (200) [real] – in: coefficients
gf [real] – out: \(Gmn(-C,X)\)
gd [real] – out: \(Gmn'(-C,X)\)
- subroutine sf_special/herzo(n, x, w)
HERZO computes the zeros the Hermite polynomial Hn(x).
This procedure computes the zeros of Hermite polynomial Ln(x) in the interval [-1,+1], and the corresponding weighting coefficients for Gauss-Hermite integration.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer] – in: the order of the polynomial
- Parameters:
x (n) [real] – out: the zeros
w (n) [real] – out: the corresponding weights
- subroutine sf_special/hygfx(a, b, c, x, hf)
HYGFX evaluates the hypergeometric function F(A,B,C,X).
Original FORTRAN77 version by Shanjie Zhang, Jianming Jin. FORTRAN90 version by John Burkardt. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [real] – in: the argument A of the function
b [real] – in: the argument B of the function
c [real] – in: the argument C of the function, not a nonpositive integer
x [real] – in: the argument :math:’X’ of the function, :math:’X’ < 1
hf [real] – out: the value of the function
- subroutine sf_special/hygfz(a, b, c, z, zhf)
HYGFZ computes the hypergeometric function F(a,b,c,x) for complex argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [real] – in: parameter A
b [real] – in: parameter B
c [real] – in: parameter C
z [complex] – in: the argument
zhf [complex] – out: the value of F(a,b,c,z)
- subroutine sf_special/ik01a(x, bi0, di0, bi1, di1, bk0, dk0, bk1, dk1)
IK01A compute Bessel function I0(x), I1(x), K0(x), and K1(x).
This procedure computes modified Bessel functions I0(x), I1(x), K0(x) and K1(x), and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
bi0 [real] – out: I0(x)
di0 [real] – out: I0’(x)
bi1 [real] – out: I1(x)
di1 [real] – out: I1’(x)
bk0 [real] – out: K0(x)
dk0 [real] – out: K0’(x)
bk1 [real] – out: K1(x)
dk1 [real] – out: K1’(x)
- subroutine sf_special/ik01b(x, bi0, di0, bi1, di1, bk0, dk0, bk1, dk1)
IK01B: Bessel functions I0(x), I1(x), K0(x), and K1(x) and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
bi0 [real] – out: I0(x)
di0 [real] – out: I0’(x)
bi1 [real] – out: I1(x)
di1 [real] – out: I1’(x)
bk0 [real] – out: K0(x)
dk0 [real] – out: K0’(x)
bk1 [real] – out: K1(x)
dk1 [real] – out: K1’(x)
- subroutine sf_special/ikna(n, x, nm, bi, di, bk, dk)
IKNA compute Bessel function In(x) and Kn(x), and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(bi, 0)] – in: the order of In(x) and Kn(x)
- Parameters:
x [real] – in: the argument
nm [integer] – out: the highest order computed
bi (1 + n) [real] – out: In(x)
di (1 + n) [real] – out: In’(x)
bk (1 + n) [real] – out: Kn(x)
dk (1 + n) [real] – out: Kn’(x)
- subroutine sf_special/iknb(n, x, nm, bi, di, bk, dk)
IKNB compute Bessel function In(x) and Kn(x).
Compute modified Bessel functions In(x) and Kn(x), and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(bi, 0)] – in: the order of In(x) and Kn(x)
- Parameters:
x [real] – in: the argument
nm [integer] – out: the highest order computed
bi (1 + n) [real] – out: In(x)
di (1 + n) [real] – out: In’(x)
bk (1 + n) [real] – out: Kn(x)
dk (1 + n) [real] – out: Kn’(x)
- subroutine sf_special/ikv(v, x, vm, bi, di, bk, dk)
IKV compute modified Bessel function Iv(x) and Kv(x) and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order of Iv(x) and Kv(x). V = N + V0
x [real] – in: the argument
vm [real] – out: the highest order computed
bi (·) [real] – out: In+v0(x)
di (·) [real] – out: In+v0’(x)
bk (·) [real] – out: Kn+v0(x)
dk (·) [real] – out: Kn+v0’(x)
- subroutine sf_special/incob(a, b, x, bix)
INCOB computes the incomplete beta function Ix(a,b).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [real] – in: parameter A
b [real] – in: parameter B
x [real] – in: the argument
bix [real] – out: the function value
- subroutine sf_special/incog(a, x, gin, gim, gip)
INCOG computes the incomplete gamma function r(a,x), Gamma(a,x), P(a,x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [real] – in: the parameter
x [real] – in: the argument
gin [real] – out: r(a,x)
gim [real] – out: Gamma(a,x)
gip [real] – out: P(a,x)
- subroutine sf_special/itairy(x, apt, bpt, ant, bnt)
ITAIRY computes the integrals of Airy functions.
Compute the integrals of Airy functions with respect to t, from 0 and x.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the upper limit of the integral
apt [real] – out: the integral from 0 to x of Ai(t)
bpt [real] – out: the integral from 0 to x of Bi(t)
ant [real] – out: the integral from 0 to x of Ai(-t)
bnt [real] – out: the integral from 0 to x of Bi(-t)
- subroutine sf_special/itika(x, ti, tk)
ITIKA computes the integral of the modified Bessel functions I0(t) and K0(t).
This procedure integrates modified Bessel functions I0(t) and K0(t) with respect to t from 0 to x.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the upper limit of the integral
ti [real] – out: the integral of I0(t) from 0 to \(X\)
tk [real] – out: the integral of K0(t) from 0 to \(X\)
- subroutine sf_special/itikb(x, ti, tk)
ITIKB computes the integral of the Bessel functions I0(t) and K0(t).
This procedure integrates Bessel functions I0(t) and K0(t) with respect to t from 0 to x.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the upper limit of the integral
ti [real] – out: the integral of I0(t) from 0 to X
tk [real] – out: the integral of K0(t) from 0 to X
- subroutine sf_special/itjya(x, tj, ty)
ITJYA computes integrals of Bessel functions J0(t) and Y0(t).
This procedure integrates Bessel functions J0(t) and Y0(t) with respect to t from 0 to x.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the upper limit of the integral
tj [real] – out: the integral of J0(t) from 0 to x
ty [real] – out: the integral of Y0(t) from 0 to x
- subroutine sf_special/itjyb(x, tj, ty)
ITJYB computes integrals of Bessel functions J0(t) and Y0(t).
This procedure integrates Bessel functions J0(t) and Y0(t) with respect to t from 0 to x.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the upper limit of the integral
tj [real] – out: the integral of J0(t) from 0 to x
ty [real] – out: the integral of Y0(t) from 0 to x
- subroutine sf_special/itsh0(x, th0)
ITSH0 integrates the Struve function H0(t) from 0 to x.
This procedure evaluates the integral of Struve function H0(t) with respect to t from 0 and x.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the upper limit of the integral
th0 [real] – out: the integral of H0(t) from 0 to x
- subroutine sf_special/itsl0(x, tl0)
ITSL0 integrates the Struve function L0(t) from 0 to x.
This procedure evaluates the integral of modified Struve function L0(t) with respect to t from 0 to x.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the upper limit of the integral
tl0 [real] – out: the integral of L0(t) from 0 to x
- subroutine sf_special/itth0(x, tth)
ITTH0 integrates H0(t)/t from x to oo.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the lower limit of the integral
tth [real] – out: the integral of H0(t)/t from x to oo
- subroutine sf_special/ittika(x, tti, ttk)
ITTIKA integrates (I0(t)-1)/t from 0 to x, K0(t)/t from x to infinity.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the integral limit
tti [real] – out: the integral of [I0(t)-1]/t from 0 to x
ttk [real] – out: the integral of K0(t)/t from x to oo
- subroutine sf_special/ittikb(x, tti, ttk)
ITTIKB integrates (I0(t)-1)/t from 0 to x, K0(t)/t from x to infinity.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the integral limit
tti [real] – out: the integral of [I0(t)-1]/t from 0 to x
ttk [real] – out: the integral of K0(t)/t from x to oo
- subroutine sf_special/ittjya(x, ttj, tty)
ITTJYA integrates (1-J0(t))/t from 0 to x, and Y0(t)/t from x to infinity.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the integral limit
ttj [real] – out: the integral of [1-J0(t)]/t from 0 to x
tty [real] – out: the integral of Y0(t)/t from x to oo
- subroutine sf_special/ittjyb(x, ttj, tty)
ITTJYB integrates (1-J0(t))/t from 0 to x, and Y0(t)/t from x to infinity.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the integral limit
ttj [real] – out: the integral of [1-J0(t)]/t from 0 to x
tty [real] – out: the integral of Y0(t)/t from x to oo
- subroutine sf_special/jdzo(nt, n, m, p, zo)
JDZO computes the zeros of Bessel functions Jn(x) and Jn’(x).
This procedure computes the zeros of Bessel functions Jn(x) and Jn’(x), and arrange them in the order of their magnitudes.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
M: the 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) )
P: ‘TM’ or ‘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
- Parameters:
nt [integer] – in: the number of zeros
n (1400) [integer] – out: the order of Jn(x) or Jn’(x) associated with the L-th zero
m (1400) [integer] – out: serial number of the zeros of Jn(x) or Jn’(x) associated with the L-th zero
p (1400) [character(len=4)] – out: code, ‘TM’ for the zeros of Jn(x) or ‘TE’ for those of Jn’(x)
zo (1400) [real] – out: the zeros of Jn(x) and Jn’(x)
- subroutine sf_special/jelp(u, hk, esn, ecn, edn, eph)
JELP computes Jacobian elliptic functions SN(u), CN(u), DN(u).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
u [real] – in: the argument
hk [real] – in: the modulus, between 0 and 1
esn [real] – out: sn(u)
ecn [real] – out: cn(u)
edn [real] – out: dn(u)
eph [real] – out: and phi (in degrees)
- subroutine sf_special/jy01a(x, bj0, dj0, bj1, dj1, by0, dy0, by1, dy1)
JY01A computes Bessel functions J0(x), J1(x), Y0(x), Y1(x) and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
bj0 [real] – out: J0(x)
dj0 [real] – out: J0’(x)
bj1 [real] – out: J1(x)
dj1 [real] – out: J1’(x)
by0 [real] – out: Y0(x)
dy0 [real] – out: Y0’(x)
by1 [real] – out: Y1(x)
dy1 [real] – out: Y1’(x)
- subroutine sf_special/jy01b(x, bj0, dj0, bj1, dj1, by0, dy0, by1, dy1)
JY01B computes Bessel functions J0(x), J1(x), Y0(x), Y1(x) and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
bj0 [real] – out: J0(x)
dj0 [real] – out: J0’(x)
bj1 [real] – out: J1(x)
dj1 [real] – out: J1’(x)
by0 [real] – out: Y0(x)
dy0 [real] – out: Y0’(x)
by1 [real] – out: Y1(x)
dy1 [real] – out: Y1’(x)
- subroutine sf_special/jyna(n, x, nm, bj, dj, by, dy)
JYNA computes Bessel functions Jn(x) and Yn(x) and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(bj, 0)] – in: the order
- Parameters:
x [real] – in: the argument
nm [integer] – out: the highest order computed
bj (1 + n) [real] – out: Jn(x)
dj (1 + n) [real] – out: Jn’(x)
by (1 + n) [real] – out: Yn(x)
dy (1 + n) [real] – out: Yn’(x)
- subroutine sf_special/jynb(n, x, nm, bj, dj, by, dy)
JYNB computes Bessel functions Jn(x) and Yn(x) and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(bj, 0)] – in: the order
- Parameters:
x [real] – in: the argument
nm [integer] – out: the highest order computed
bj (1 + n) [real] – out: Jn(x)
dj (1 + n) [real] – out: Jn’(x)
by (1 + n) [real] – out: Yn(x)
dy (1 + n) [real] – out: Yn’(x)
- subroutine sf_special/jyndd(n, x, bjn, djn, fjn, byn, dyn, fyn)
JYNDD: Bessel functions Jn(x) and Yn(x), first and second derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
n [integer] – in: the order
x [real] – in: the argument
bjn [real] – out: Jn(x)
djn [real] – out: Jn’(x)
fjn [real] – out: Jn”(x)
byn [real] – out: Yn(x)
dyn [real] – out: Yn’(x)
fyn [real] – out: Yn”(x)
- subroutine sf_special/jyv(v, x, vm, bj, dj, by, dy)
JYV computes Bessel functions Jv(x) and Yv(x) and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order of Jv(x) and Yv(x)
x [real] – in: the argument of Jv(x) and Yv(x)
vm [real] – out: the highest order computed
bj (·) [real] – out: Jn+v0(x)
dj (·) [real] – out: Jn+v0’(x)
by (·) [real] – out: Yn+v0(x)
dy (·) [real] – out: Yn+v0’(x)
- subroutine sf_special/jyzo(n, nt, rj0, rj1, ry0, ry1)
JYZO computes the zeros of Bessel functions Jn(x), Yn(x) and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
n [integer] – in: the order of the Bessel functions
rj0 (nt) [real] – out: Jn(x)
rj1 (nt) [real] – out: Jn’(x)
ry0 (nt) [real] – out: Yn(x)
ry1 (nt) [real] – out: Yn’(x)
- Options:
nt [integer] – in: the number of zeros
- subroutine sf_special/klvna(x, ber, bei, ger, gei, der, dei, her, hei)
KLVNA: Kelvin functions ber(x), bei(x), ker(x), and kei(x), and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
ber [real] – out:
ber(x)bei [real] – out:
bei(x)ger [real] – out:
ker(x)gei [real] – out:
kei(x)der [real] – out: derivative of
ber(x)dei [real] – out: derivative of
bei(x)her [real] – out: derivative of
ker(x)hei [real] – out: derivative of
kei(x)
- subroutine sf_special/klvnb(x, ber, bei, ger, gei, der, dei, her, hei)
KLVNB: Kelvin functions ber(x), bei(x), ker(x), and kei(x), and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
ber [real] – out:
ber(x)bei [real] – out:
bei(x)ger [real] – out:
ker(x)gei [real] – out:
kei(x)der [real] – out: derivative of
ber(x)dei [real] – out: derivative of
bei(x)her [real] – out: derivative of
ker(x)hei [real] – out: derivative of
kei(x)
- subroutine sf_special/klvnzo(nt, kd, zo)
KLVNZO computes zeros of the Kelvin functions.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Possible values of the function code
kd:1:ber(x)2:bei(x)3:ker(x)4:kei(x)5: derivative ofber(x)6: derivative ofbei(x)7: derivative ofker(x)8: derivative ofkei(x)
- Options:
nt [integer] – in: the number of zeros
- Parameters:
kd [integer] – in: function code
zo (nt) [real] – out: the zeros of the given Kelvin function
- subroutine sf_special/kmn(m, n, c, cv, kd, df, dn, ck1, ck2)
KMN: expansion coefficients of prolate or oblate spheroidal functions.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter; M = 0, 1, 2, …
n [integer] – in: mode parameter, N = M, M + 1, M + 2, …
c [real] – in: spheroidal parameter
cv [real] – in: the characteristic value
kd [integer] – in: the function code. 1, the prolate function. -1, the oblate function
df (200) [real] – in: the expansion coefficients
dn (200) [real] – expansion coefficients
ck1 [real] – joining factor
ck2 [real] – joining factor
- subroutine sf_special/lagzo(n, x, w)
LAGZO computes zeros of the Laguerre polynomial, and integration weights.
This procedure computes the zeros of Laguerre polynomial Ln(x) in the interval [0,infinity], and the corresponding weighting coefficients for Gauss-Laguerre integration.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer] – in: the order of the Laguerre polynomial
- Parameters:
x (n) [real] – out: the zeros of the Laguerre polynomial
w (n) [real] – out: the weighting coefficients
- subroutine sf_special/lamn(n, x, nm, bl, dl)
LAMN computes lambda functions and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(bl, 0)] – in: the order
- Parameters:
x [real] – in: the argument
nm [integer] – out: the highest order computed
bl (1 + n) [real] – out: the lambda function
dl (1 + n) [real] – out: its derivative of orders 0 through N
- subroutine sf_special/lamv(v, x, vm, vl, dl)
LAMV computes lambda functions and derivatives of arbitrary order.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real, in,required] – in: the order
x [real] – in: the argument
vm [real] – out: the highest order computed
vl (1 + int(v)) [real] – out: the Lambda function, of orders N+V0
dl (1 + int(v)) [real] – out: the derivative of the Lambda function, of orders N+V0
- subroutine sf_special/legzo(n, x, w)
LEGZO computes the zeros of Legendre polynomials, and integration weights.
This procedure computes the zeros of Legendre polynomial Pn(x) in the interval [-1,1], and the corresponding weighting coefficients for Gauss-Legendre integration.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer] – in: the order of the polynomial
- Parameters:
x (n) [real] – out: the polynomial
w (n) [real] – out: and the corresponding weights
- subroutine sf_special/lgama(kf, x, gl)
LGAMA computes the gamma function or its logarithm.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
kf [integer] – in: the argument code. 1, for gamma(x); 2, for ln(gamma(x))
x [real] – in: the argument
gl [real] – out: the function value
- subroutine sf_special/lpmn(mm, m, n, x, pm, pd)
LPMN computes associated Legendre functions Pmn(X) and derivatives P’mn(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
mm [integer, optional,default=-1 + shape(pm, 0)] – in: the leading dimension of PM and PD
n [integer, optional,default=-1 + shape(pm, 1)] – in: the degree of Pmn(x)
- Parameters:
m [integer] – in: the order of Pmn(x)
x [real] – in: the argument of Pmn(x)
pm (1 + mm, 1 + n) [real] – out: Pmn(x)
pd (1 + mm, 1 + n) [real] – out: Pmn’(x)
- subroutine sf_special/lpmns(m, n, x, pm, pd)
LPMNS computes associated Legendre functions Pmn(X) and derivatives P’mn(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the order of Pmn(x)
x [real] – in: the argument
pm (1 + n) [real] – out: the values of the function from degree 0 to N
pd (1 + n) [real] – out: the derivatives of the function from degree 0 to N
- Options:
n [integer, optional,default=-1 + shape(pm, 0)] – in: the degree of Pmn(x)
- subroutine sf_special/lpmv(v, m, x, pmv)
LPMV computes associated Legendre functions Pmv(X) with arbitrary degree.
Compute the associated Legendre function Pmv(x) with an integer order and an arbitrary nonnegative degree v.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the degree of Pmv(x)
m [integer] – in: the order of Pmv(x)
x [real] – in: the argument of Pm(x)
pmv [real] – out: the value of Pm(x)
- subroutine sf_special/lpn(n, x, pn, pd)
LPN computes Legendre polynomials Pn(x) and derivatives Pn’(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(pn, 0)] – in: the maximum degree
- Parameters:
x [real] – in: the argument
pn (1 + n) [real] – out: the values of the polynomials of degrees 0 to N at X
pd (1 + n) [real] – out: the derivatives of the polynomials of degrees 0 to N at X
- subroutine sf_special/lpni(n, x, pn, pd, pl)
LPNI computes Legendre polynomials Pn(x), derivatives, and integrals.
This routine computes Legendre polynomials Pn(x), Pn’(x) and the integral of Pn(t) from 0 to x.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(pn, 0)] – in: the maximum degree
- Parameters:
x [real] – in: the argument
pn (1 + n) [real] – out: the values of the polynomials of degrees 0 to N at X
pd (1 + n) [real] – out: the derivatives of the polynomials of degrees 0 to N at X
pl (1 + n) [real] – out: the integrals of the polynomials of degrees 0 to N at X
- subroutine sf_special/lqmn(mm, m, n, x, qm, qd)
LQMN computes associated Legendre functions Qmn(x) and derivatives.
This routine computes the associated Legendre functions of the second kind, Qmn(x) and Qmn’(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
mm [integer, optional,default=-1 + shape(qm, 0)] – in: determines the leading dimension of QM and QD
n [integer, optional,default=-1 + shape(qm, 1)] – in: the degree of Qmn(x)
- Parameters:
m [integer] – in: the order of Qmn(x)
x [real] – the argument
qm (1 + mm, 1 + n) [real] – out: the values of Qmn(x)
qd (1 + mm, 1 + n) [real] – out: the values of Qmn’(x)
- subroutine sf_special/lqmns(m, n, x, qm, qd)
LQMNS computes associated Legendre functions Qmn(x) and derivatives Qmn’(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the order
x [real] – in: the argument
qm (1 + n) [real] – out: Qmn(x)
qd (1 + n) [real] – out: Qmn’(x)
- Options:
n [integer, optional,default=-1 + shape(qm, 0)] – in: the degree
- subroutine sf_special/lqna(n, x, qn, qd)
LQNA computes Legendre function Qn(x) and derivatives Qn’(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(qn, 0)] – in: the degree of Qn(x)
- Parameters:
x [real] – in: the argument of Qn(x)
qn (1 + n) [real] – out: Qn(x)
qd (1 + n) [real] – out: Qn’(x)
- subroutine sf_special/lqnb(n, x, qn, qd)
LQNB computes Legendre function Qn(x) and derivatives Qn’(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(qn, 0)] – in: the degree of Qn(x)
- Parameters:
x [real] – in: the argument of Qn(x)
qn (1 + n) [real] – out: Qn(x)
qd (1 + n) [real] – out: Qn’(x)
- function sf_special/msta1(x, mp)
MSTA1 determines a backward recurrence starting point for Jn(x).
This procedure determines the starting point for backward recurrence such that the magnitude of Jn(x) at that point is about 10^(-MP).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
mp [integer] – in: the negative logarithm of the desired magnitude
- Result:
msta1 [integer] – out: the starting point
- function sf_special/msta2(x, n, mp)
MSTA2 determines a backward recurrence starting point for Jn(x).
This procedure determines the starting point for a backward recurrence such that all Jn(x) has MP significant digits.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument of Jn(x)
n [integer] – in: the order of Jn(x)
mp [integer] – in: the number of significant digits
- Result:
msta2 [integer] – out: the starting point
- subroutine sf_special/mtu0(kf, m, q, x, csf, csd)
MTU0 computes Mathieu functions CEM(x,q) and SEM(x,q) and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KF: the function code. 1 for computing cem(x,q) and cem’(x,q) 2 for computing sem(x,q) and sem’(x,q)
- Parameters:
kf [integer] – in: function code: 1 for cem(x,q) and cem’(x,q), 2 for sem(x,q) and sem’(x,q)
m [integer] – in: the order of the Mathieu functions
q [real] – in: the parameter of the Mathieu functions
x [real] – in: the argument of the Mathieu functions, in degrees
csf [real] – out: cem(x,q) or sem(x,q)
csd [real] – out: cem’(x,q) or sem’(x,q)
- subroutine sf_special/mtu12(kf, kc, m, q, x, f1r, d1r, f2r, d2r)
MTU12 computes modified Mathieu functions of the first and second kind.
This procedure computes modified Mathieu functions of the first and second kinds, Mcm(1)(2)(x,q) and Msm(1)(2)(x,q), and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KC: the function code. 1, for computing the first kind 2, for computing the second kind or Msm(2)(x,q) and Msm(2)’(x,q) 3, for computing both the first and second kinds
F1R, D1R, F2R, D2R: the values of Mcm(1)(x,q) or Msm(1)(x,q), Derivative of Mcm(1)(x,q) or Msm(1)(x,q), Mcm(2)(x,q) or Msm(2)(x,q), Derivative of Mcm(2)(x,q) or Msm(2)(x,q)
- Parameters:
kf [integer] – in: the function code. 1 for computing Mcm(x,q); 2 for computing Msm(x,q)
kc [integer] – in: function code: 1 first kind, 2 second kind, 3 both
m [integer] – in: the order of the Mathieu functions
q [real] – in: the parameter of the Mathieu functions
x [real] – in: the argument of the Mathieu functions
f1r [real] – out: Mcm(1)(x,q) or Msm(1)(x,q)
d1r [real] – out: derivative of Mcm(1)(x,q) or Msm(1)(x,q)
f2r [real] – out: Mcm(2)(x,q) or Msm(2)(x,q)
d2r [real] – out: derivative of Mcm(2)(x,q) or Msm(2)(x,q)
- subroutine sf_special/othpl(kf, n, x, pl, dpl)
OTHPL computes orthogonal polynomials Tn(x), Un(x), Ln(x) or Hn(x).
This procedure computes orthogonal polynomials: Tn(x) or Un(x), or Ln(x) or Hn(x), and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
kf [integer] – function code: 1 Chebyshev Tn(x), 2 Chebyshev Un(x), 3 Laguerre Ln(x), 4 Hermite Hn(x)
x [real] – in: the argument
pl (1 + n) [real] – out: the value of the polynomials of order 0 through N at X
dpl (1 + n) [real] – out: the derivative of the polynomials of order 0 through N at X
- Options:
n [integer, optional,default=-1 + shape(pl, 0)] – in: the order
- subroutine sf_special/pbdv(v, x, dv, dp, pdf, pdd)
PBDV computes parabolic cylinder functions Dv(x) and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order
x [real] – in: the argument
dv (·) [real] – out: Dn+v0(x)
dp (·) [real] – out: Dn+v0’(x)
pdf [real] – out: Dv(x)
pdd [real] – out: Dv’(x)
- subroutine sf_special/pbvv(v, x, vv, vp, pvf, pvd)
PBVV computes parabolic cylinder functions Vv(x) and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order
x [real] – in: the argument
vv (·) [real] – out: Vv(x)
vp (·) [real] – out: Vv’(x)
pvf [real] – out: Vv(x)
pvd [real] – out: Vv’(x)
- subroutine sf_special/pbwa(a, x, w1f, w1d, w2f, w2d)
PBWA computes parabolic cylinder functions W(a,x) and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
a [real] – in: the parameter
x [real] – in: the argument
w1f [real] – out: W(a,x)
w1d [real] – out: W’(a,x)
w2f [real] – out: W(a,-x)
w2d [real] – out: W’(a,-x)
- subroutine sf_special/qstar(m, n, c, ck, ck1, qs, qt)
QSTAR computes Q*mn(-ic) for oblate radial functions with a small argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter; M = 0, 1, 2, …
n [integer] – in: mode parameter, N = M, M + 1, M + 2, …
c [real] – in: spheroidal parameter
ck (200) [real] – in: not documented in the original header
ck1 [real] – in: not documented in the original header
qs [real] – out: not documented in the original header
qt [real] – out: not documented in the original header
- subroutine sf_special/rctj(n, x, nm, rj, dj)
RCTJ computes Riccati-Bessel function of the first kind, and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(rj, 0)] – in: the order of jn(x)
- Parameters:
x [real] – in: the argument
nm [integer] – out: the highest order computed
rj (1 + n) [real] – out: the values of x jn(x)
dj (1 + n) [real] – out: the values of [x jn(x)]’
- subroutine sf_special/rcty(n, x, nm, ry, dy)
RCTY computes Riccati-Bessel function of the second kind, and derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(ry, 0)] – in: the order of yn(x)
- Parameters:
x [real] – in: the argument
nm [integer] – out: the highest order computed
ry (1 + n) [real] – out: the values of x yn(x)
dy (1 + n) [real] – out: the values of [x yn(x)]’
- subroutine sf_special/refine(kd, m, q, a, iflag)
REFINE refines an estimate of the characteristic value of Mathieu functions.
This procedure calculates the accurate characteristic value by the secant method.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KD: the case code: 1, for cem(x,q) ( m = 0,2,4,…) 2, for cem(x,q) ( m = 1,3,5,…) 3, for sem(x,q) ( m = 1,3,5,…) 4, for sem(x,q) ( m = 2,4,6,…)
- Parameters:
kd [integer] – in: case code: 1 cem (m=0,2,4,..), 2 cem (m=1,3,5,..), 3 sem (m=1,3,5,..), 4 sem (m=2,4,6,..)
m [integer] – in: the order of the Mathieu functions
q [real] – in: the parameter of the Mathieu functions
a [real] – in/out: the characteristic value, which should have been refined on output
iflag [integer] – set to -10 on output if the refinement failed
- subroutine sf_special/rmn1(m, n, c, x, df, kd, r1f, r1d)
RMN1 computes prolate and oblate spheroidal functions of the first kind.
This procedure computes prolate and oblate spheroidal radial functions of the first kind for given m, n, c and x.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter; M = 0, 1, 2, …
n [integer] – in: mode parameter, N = M, M + 1, M + 2, …
c [real] – in: spheroidal parameter
x [real] – in: the argument
df (200) [real] – in: the expansion coefficients
kd [integer] – in: the function code. 1, the prolate function. -1, the oblate function
r1f [real] – out: the function value
r1d [real] – out: the derivative value
- subroutine sf_special/rmn2l(m, n, c, x, df, kd, r2f, r2d, id)
RMN2L: prolate and oblate spheroidal functions, second kind, large CX.
This procedure computes prolate and oblate spheroidal radial functions of the second kind for given m, n, c and a large cx.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter; M = 0, 1, 2, …
n [integer] – in: mode parameter, N = M, M + 1, M + 2, …
c [real] – in: spheroidal parameter
x [real] – in: the argument
df (200) [real] – in: the expansion coefficients
kd [integer] – in: the function code. 1, the prolate function. -1, the oblate function
r2f [real] – out: the function value
r2d [real] – out: the derivative value
id [integer] – estimated accuracy, number of digits
- subroutine sf_special/rmn2so(m, n, c, x, cv, df, kd, r2f, r2d)
RMN2SO: oblate radial functions of the second kind with small argument.
This procedure computes oblate radial functions of the second kind with a small argument, Rmn(-ic,ix) and Rmn’(-ic,ix).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter; M = 0, 1, 2, …
n [integer] – in: mode parameter, N = M, M + 1, M + 2, …
c [real] – in: spheroidal parameter
x [real] – in: the argument
cv [real] – in: the characteristic value
df (200) [real] – in: the expansion coefficients
kd [integer] – in: the function code. 1, the prolate function. -1, the oblate function
r2f [real] – out: Rmn(-ic,ix)
r2d [real] – out: Rmn’(-ic,ix)
- subroutine sf_special/rmn2sp(m, n, c, x, cv, df, kd, r2f, r2d)
RMN2SP: prolate, oblate spheroidal radial functions, kind 2, small argument.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter; M = 0, 1, 2, …
n [integer] – in: mode parameter, N = M, M + 1, M + 2, …
c [real] – in: spheroidal parameter
x [real] – in: the argument
cv [real] – in: the characteristic value
df (200) [real] – in: the expansion coefficients
kd [integer] – in: the function code. 1, the prolate function. -1, the oblate function
r2f [real] – out: the values of the function
r2d [real] – out: its derivative
- subroutine sf_special/rswfo(m, n, c, x, cv, kf, r1f, r1d, r2f, r2d)
RSWFO computes prolate spheroidal radial function of first and second kinds.
This procedure computes oblate radial functions of the first and second kinds, and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KF: the function code. 1, for the first kind 2, for the second kind 3, for both the first and second kinds
- Parameters:
m [integer] – in: the mode parameter; M = 0, 1, 2, …
n [integer] – in: mode parameter, N = M, M + 1, M + 2, …
c [real] – in: spheroidal parameter
x [real] – in: the argument
cv [real] – in: the characteristic value
kf [integer] – in: function code: 1 first kind, 2 second kind, 3 both
r1f [real] – out: the radial function of the first kind;
r1d [real] – out: the derivative of the radial function of the first kind;
r2f [real] – out: the radial function of the second kind;
r2d [real] – out: the derivative of the radial function of the second kind;
- subroutine sf_special/rswfp(m, n, c, x, cv, kf, r1f, r1d, r2f, r2d)
RSWFP computes prolate spheroidal radial function of first and second kinds.
This procedure computes prolate spheriodal radial functions of the first and second kinds, and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
KF: the function code. 1, for the first kind 2, for the second kind 3, for both the first and second kinds
- Parameters:
m [integer] – in: the mode parameter; M = 0, 1, 2, …
n [integer] – in: mode parameter, N = M, M + 1, M + 2, …
c [real] – in: spheroidal parameter
x [real] – in: the argument of the radial function, 1 < X
cv [real] – in: the characteristic value
kf [integer] – in: function code: 1 first kind, 2 second kind, 3 both
r1f [real] – out: the radial function of the first kind;
r1d [real] – out: the derivative of the radial function of the first kind;
r2f [real] – out: the radial function of the second kind;
r2d [real] – out: the derivative of the radial function of the second kind;
- subroutine sf_special/scka(m, n, c, cv, kd, ck)
SCKA: expansion coefficients for prolate and oblate spheroidal functions.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter
n [integer] – in: the mode parameter
c [real] – in: the spheroidal parameter
cv [real] – in: the characteristic value
kd [integer] – in: the function code. 1, the prolate function. -1, the oblate function
ck (200) [real] – out: the expansion coefficients. CK(1), CK(2), … correspond to c0, c2, …, and so on
- subroutine sf_special/sckb(m, n, c, df, ck)
SCKB: expansion coefficients for prolate and oblate spheroidal functions.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter
n [integer] – in: the mode parameter
c [real] – in: the spheroidal parameter
df (200) [real] – in: the expansion coefficients DK
ck (200) [real] – out: the expansion coefficients CK
- subroutine sf_special/sdmn(m, n, c, cv, kd, df)
SDMN: expansion coefficients for prolate and oblate spheroidal functions.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
Details of the arguments:
DF: expansion coefficients; DF(1), DF(2), … correspond to d0, d2, … for even n-m and d1, d3, … for odd n-m
- Parameters:
m [integer] – in: the mode parameter
n [integer] – in: the mode parameter
c [real] – in: the spheroidal parameter
cv [real] – in: the characteristic value
kd [integer] – in: the function code. 1, the prolate function. -1, the oblate function
df (200) [real] – out: expansion coefficients: d0, d2, … for even n-m, d1, d3, … for odd n-m
- subroutine sf_special/segv(m, n, c, kd, cv, eg)
SEGV computes the characteristic values of spheroidal wave functions.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
m [integer] – in: the mode parameter
n [integer] – in: the mode parameter
c [real] – in: the spheroidal parameter
kd [integer] – in: the function code. 1, the prolate function. -1, the oblate function
cv [real] – out: the characteristic value
eg (200) [real] – out: the characteristic value for mode parameters m and n. ( L = n - m + 1 )
- subroutine sf_special/sphi(n, x, nm, si, di)
SPHI computes spherical Bessel functions in(x) and their derivatives in’(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(si, 0)] – in: the order of In(X)
- Parameters:
x [real] – in: the argument
nm [integer] – out: the highest order computed
si (1 + n) [real] – out: the values of the function of orders 0 through N
di (1 + n) [real] – out: the derivatives of the function of orders 0 through N
- subroutine sf_special/sphj(n, x, nm, sj, dj)
SPHJ computes spherical Bessel functions jn(x) and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(sj, 0)] – in: the order
- Parameters:
x [real] – in: the argument
nm [integer] – out: the highest order computed
sj (1 + n) [real] – out: the values of jn(x)
dj (1 + n) [real] – out: the values of jn’(x)
- subroutine sf_special/sphk(n, x, nm, sk, dk)
SPHK computes modified spherical Bessel functions kn(x) and derivatives.
This procedure computes modified spherical Bessel functions of the second kind, kn(x) and kn’(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(sk, 0)] – in: the order
- Parameters:
x [real] – in: the argument
nm [integer] – out: the highest order computed
sk (1 + n) [real] – out: kn(x)
dk (1 + n) [real] – out: kn’(x)
- subroutine sf_special/sphy(n, x, nm, sy, dy)
SPHY computes spherical Bessel functions yn(x) and their derivatives.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Options:
n [integer, optional,default=-1 + shape(sy, 0)] – in: the order
- Parameters:
x [real] – in: the argument
nm [integer] – out: the highest order computed
sy (1 + n) [real] – out: yn(x)
dy (1 + n) [real] – out: yn’(x)
- subroutine sf_special/stvh0(x, sh0)
STVH0 computes the Struve function H0(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
sh0 [real] – out: the value of H0(x)
- subroutine sf_special/stvh1(x, sh1)
STVH1 computes the Struve function H1(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
sh1 [real] – out: the value of H1(x)
- subroutine sf_special/stvhv(v, x, hv)
STVHV computes the Struve function Hv(x) with arbitrary order v.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order of the function
x [real] – in: the argument
hv [real] – out: the value of Hv(x)
- subroutine sf_special/stvl0(x, sl0)
STVL0 computes the modified Struve function L0(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
sl0 [real] – out: the function value
- subroutine sf_special/stvl1(x, sl1)
STVL1 computes the modified Struve function L1(x).
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
x [real] – in: the argument
sl1 [real] – out: the function value
- subroutine sf_special/stvlv(v, x, slv)
STVLV computes the modified Struve function Lv(x) with arbitary order.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
v [real] – in: the order of Lv(x)
x [real] – in: the argument of Lv(x)
slv [real] – out: the value of Lv(x)
- subroutine sf_special/vvla(va, x, pv)
VVLA computes parabolic cylinder function Vv(x) for large arguments.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
va [real] – in: the order nu
x [real] – in: the argument
pv [real] – out: the value of V(nu,x)
- subroutine sf_special/vvsa(va, x, pv)
VVSA computes parabolic cylinder function V(nu,x) for small arguments.
Original FORTRAN77 version by Shanjie Zhang and Jianming Jin. Reference: Shanjie Zhang, Jianming Jin, Computation of Special Functions, Wiley, 1996.
- Parameters:
va [real] – in: the order nu
x [real] – in: the argument
pv [real] – out: the value of V(nu,x)