References
- Clausen functions: Quadrature processes for efficient calculation of the Clausen functions
- Coulomb wave functions: Connection formulas between Coulomb wave functions
- Debye functions: Calculation of Integer and Noninteger n-Dimensional Debye Functions Using Binomial Coefficients and Incomplete Gamma Functions
- Fermi-Dirac integrals: Notes on Fermi-Dirac Integrals
- Marcum Q-function: https://arxiv.org/pdf/1311.0681v1
- Parabolic cylinder functions
API
FewSpecialFunctions.η — Functionη(a::Number, k::Number)
η(ϵ::Number)Coulomb parameter. For two arguments, returns 1/(a*k). For one argument, returns 1/sqrt(ϵ).
Both a and k must be nonzero. ϵ must be nonzero.
FewSpecialFunctions.C — FunctionC(ℓ::Number, η::Number)Coulomb normalization constant.
FewSpecialFunctions.θ — Functionθ(ℓ::Number, η::Number, ρ::Number)Coulomb phase function.
FewSpecialFunctions.F — FunctionF(ℓ::Number, η::Number, ρ::Number)Regular Coulomb wave function.
References:
FewSpecialFunctions.D⁺ — FunctionD⁺(ℓ::Number, η::Number)Coulomb D⁺ normalization factor.
FewSpecialFunctions.D⁻ — FunctionD⁻(ℓ::Number, η::Number)Coulomb D⁻ normalization factor.
FewSpecialFunctions.H⁺ — FunctionH⁺(ℓ::Number, η::Number, ρ::Number)Outgoing Coulomb wave function.
References:
FewSpecialFunctions.H⁻ — FunctionH⁻(ℓ::Number, η::Number, ρ::Number)Incoming Coulomb wave function.
References:
FewSpecialFunctions.F_imag — FunctionF_imag(ℓ::Number, η::Number, ρ::Number)Imaginary part of the regular Coulomb wave function.
FewSpecialFunctions.G — FunctionG(ℓ::Number, η::Number, ρ::Number)Irregular Coulomb wave function.
References:
FewSpecialFunctions.M_regularized — FunctionM_regularized(α::Number, β::Number, γ::Number)Regularized confluent hypergeometric function.
FewSpecialFunctions.Φ — FunctionΦ(ℓ::Number, η::Number, ρ::Number)Modified Coulomb function Φ.
FewSpecialFunctions.w — Functionw(ℓ::Integer, η::Number)
w(ℓ::Number, η::Number)Auxiliary function for Coulomb wave functions.
FewSpecialFunctions.w_plus — Functionw_plus(ℓ::Number, η::Number)Auxiliary function for Coulomb wave functions.
FewSpecialFunctions.w_minus — Functionw_minus(ℓ::Number, η::Number)Auxiliary function for Coulomb wave functions.
FewSpecialFunctions.h_plus — Functionh_plus(ℓ::Number, η::Number)Auxiliary function for Coulomb wave functions.
FewSpecialFunctions.h_minus — Functionh_minus(ℓ::Number, η::Number)Auxiliary function for Coulomb wave functions.
FewSpecialFunctions.g — Functiong(ℓ::Number, η::Number)Auxiliary function for Coulomb wave functions.
FewSpecialFunctions.Φ_dot — FunctionΦ_dot(ℓ::Number, η::Number, ρ::Number; h=nothing)Numerical derivative of Φ with respect to ℓ using a central finite difference. h is the step size; defaults to cbrt(eps(T)) where T is the float type of ℓ, which is near-optimal for double-sided finite differences.
FewSpecialFunctions.F_dot — FunctionF_dot(ℓ::Number, η::Number, ρ::Number; h=nothing)Numerical derivative of F with respect to ℓ using a central finite difference. h is the step size; defaults to cbrt(eps(T)) where T is the float type of ℓ.
FewSpecialFunctions.Ψ — FunctionΨ(ℓ::Number, η::Number, ρ::Number; h=nothing)Auxiliary function for Coulomb wave functions. h is the finite-difference step size; defaults to cbrt(eps(T)) (see Φ_dot).
FewSpecialFunctions.I — FunctionI(ℓ::Number, η::Number, ρ::Number; h=nothing)Auxiliary function for Coulomb wave functions. h is the finite-difference step size; defaults to cbrt(eps(T)) (see Φ_dot).
FewSpecialFunctions.debye_function — Functiondebye_function(n::T, β::T, x::T; tol=T(1e-35), max_terms=2000) where {T <: AbstractFloat}Compute the generalized Debye function with parameters n > 0, β > 0, and x ≥ 0. Returns 1.0 at x = 0 (the limiting value). Supports any AbstractFloat type (e.g., Float32, Float64, BigFloat). Array broadcasting is supported: any one argument may be an AbstractArray.
Throws ArgumentError if n ≤ 0, β ≤ 0, or x < 0.
tol: convergence tolerance for the series (default1e-35)max_terms: maximum number of series terms (default2000)
References:
FewSpecialFunctions.FresnelC — FunctionFresnelC(z::Number) -> NumberComputes the Fresnel cosine integral C(z) for the given number z.
Arguments
z::Number: The input value (can be real or complex).
Returns
Number: The value of the Fresnel cosine integral atz.
FewSpecialFunctions.FresnelS — FunctionFresnelS(z::Number) -> NumberComputes the Fresnel sine integral S(z) for a given number z.
Arguments
z::Number: The input value (real or complex) at which to evaluate the Fresnel sine integral.
Returns
Number: The value of the Fresnel sine integral S(z).
FewSpecialFunctions.FresnelE — FunctionFresnelE(z::Number) -> NumberComputes the Fresnel E integral for the given input z.
Arguments
z::Number: The input value (real or complex) at which to evaluate the Fresnel E integral.
Returns
Number: The value of the Fresnel E integral atz.
FewSpecialFunctions.Clausen — FunctionClausen(n::Int, θ::Real; N::Int=10, m::Int=20)Compute the Clausen function Cl_n(θ) of order n at angle θ. Supports any Real input type for θ.
n must be in 1..6; N must be 10 or 20 (throws ArgumentError otherwise).
Note on singularity: Clausen(1, θ) = -log|2sin(θ/2)| has a logarithmic singularity at θ = 0, 2π, 4π, …, where it returns Inf.
N: number of Gauss-Legendre quadrature nodes used in the Euler-Maclaurin tail sum; 10 gives double precision, 20 gives extended precision.m: number of terms in the direct summation before switching to the tail formula.
References:
FewSpecialFunctions.Ci_complex — FunctionCi_complex(z::Complex{T}) where {T <: AbstractFloat}Complex cosine integral function used in Clausen function calculations. Supports any AbstractFloat type.
FewSpecialFunctions.f_n — Functionf_n(n::Int, k::Int, θ::Real)Compute the Clausen series summand fₙ(k, θ): sin(kθ)/kⁿ for even n, cos(kθ)/kⁿ for odd n. Supports any Real input type for θ.
FewSpecialFunctions.F_clausen — FunctionF_clausen(n::Int, z::Complex{T}, θ::T) where {T <: AbstractFloat}Dispatch to the correct primitive function Fₙ(z, θ) for n = 1..6. Supports any AbstractFloat type.
FewSpecialFunctions.FermiDiracIntegral — FunctionFermiDiracIntegral(j, x)The Fermi-Dirac integral
Returns the value $F_j(x)$
Supports any AbstractFloat type (e.g., Float32, Float64, BigFloat).
Resources: [1] D. Bednarczyk and J. Bednarczyk, Phys. Lett. A, 64, 409 (1978) [2] J. S. Blakemore, Solid-St. Electron, 25, 1067 (1982) [3] X. Aymerich-Humet, F. Serra-Mestres, and J. Millan, Solid-St. Electron, 24, 981 (1981) [4] X. Aymerich-Humet, F. Serra-Mestres, and J. Millan, J. Appl. Phys., 54, 2850 (1983) [5] H. M. Antia, Rational Function Approximations for Fermi-Dirac Integrals (1993)
https://arxiv.org/abs/0811.0116 https://en.wikipedia.org/wiki/CompleteFermi%E2%80%93Diracintegral https://dlmf.nist.gov/25.12#iii
FewSpecialFunctions.FermiDiracIntegralNorm — FunctionFermiDiracIntegralNorm(j,x)The Fermi-Dirac integral
\[ F_j(x) = \frac{1}{\Gamma(j+1)}\int_0^\infty \frac{t^j}{\exp(t-x)+1} \, dt\]
Returns the value $F_j(x)$
Resources: [1] D. Bednarczyk and J. Bednarczyk, Phys. Lett. A, 64, 409 (1978) [2] J. S. Blakemore, Solid-St. Electron, 25, 1067 (1982) [3] X. Aymerich-Humet, F. Serra-Mestres, and J. Millan, Solid-St. Electron, 24, 981 (1981) [4] X. Aymerich-Humet, F. Serra-Mestres, and J. Millan, J. Appl. Phys., 54, 2850 (1983) [5] H. M. Antia, Rational Function Approximations for Fermi-Dirac Integrals (1993)
https://arxiv.org/abs/0811.0116 https://de.wikipedia.org/wiki/Fermi-Dirac-Integral https://dlmf.nist.gov/25.12#iii
FewSpecialFunctions.MarcumQ — FunctionMarcumQ(μ::Real, a::Real, b::Real)Compute the generalized Marcum Q-function Q_μ(a, b) of order μ with non-centrality parameter a ≥ 0 and threshold b ≥ 0. Returns a value in [0, 1].
Requires μ ≥ 0.5, a ≥ 0, and b ≥ 0; throws ArgumentError otherwise. Supports any Real input type; arguments are promoted to a common floating-point type. Array broadcasting is supported: any one argument may be an AbstractArray.
Reference: [1] https://arxiv.org/pdf/1311.0681v1
FewSpecialFunctions.dQdb — FunctiondQdb(M, a, b)Derivative ∂Q_M(a,b)/∂b of the (standard) Marcum Q-function of order M. Requires M integer ≥1 and a>0.
FewSpecialFunctions.U — FunctionU(a::T, x::T) where {T <: AbstractFloat}Compute the parabolic cylinder function U(a,x) of the first kind for real parameters. Supports any AbstractFloat type (e.g., Float32, Float64, BigFloat).
S. Zhang and J. Jin, 'Computation of Special functions' (Wiley, 1966), E. Cojocaru, January 2009
FewSpecialFunctions.V — FunctionV(a::T, x::T) where {T <: AbstractFloat}Compute the parabolic cylinder function V(a,x). Supports any AbstractFloat type (e.g., Float32, Float64, BigFloat).
FewSpecialFunctions.W — FunctionW(a::T, x::T) where {T <: AbstractFloat}Compute the parabolic cylinder function W(a,x) for real parameters. Supports any AbstractFloat type (e.g., Float32, Float64, BigFloat).
FewSpecialFunctions.dU — FunctiondU(a::T, x::T) where {T <: AbstractFloat}Compute the derivative of the parabolic cylinder function U(a,x) for real parameters. Supports any AbstractFloat type (e.g., Float32, Float64, BigFloat).
FewSpecialFunctions.dV — FunctiondV(a::T, x::T) where {T <: AbstractFloat}Compute the derivative of the parabolic cylinder function V(a,x) for real parameters. Supports any AbstractFloat type (e.g., Float32, Float64, BigFloat).
FewSpecialFunctions.dW — FunctiondW(a::T, x::T) where {T <: AbstractFloat}Compute the derivative of the parabolic cylinder function W with parameters a evaluated at x. Supports any AbstractFloat type (e.g., Float32, Float64, BigFloat).