References

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.

source
FewSpecialFunctions.wFunction
w(ℓ::Integer, η::Number)
w(ℓ::Number, η::Number)

Auxiliary function for Coulomb wave functions.

source
FewSpecialFunctions.Φ_dotFunction
Φ_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.

source
FewSpecialFunctions.F_dotFunction
F_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 .

source
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).

source
FewSpecialFunctions.IFunction
I(ℓ::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).

source
FewSpecialFunctions.debye_functionFunction
debye_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 (default 1e-35)
  • max_terms: maximum number of series terms (default 2000)

References:

source
FewSpecialFunctions.FresnelCFunction
FresnelC(z::Number) -> Number

Computes 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 at z.
source
FewSpecialFunctions.FresnelSFunction
FresnelS(z::Number) -> Number

Computes 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).
source
FewSpecialFunctions.FresnelEFunction
FresnelE(z::Number) -> Number

Computes 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 at z.
source
FewSpecialFunctions.ClausenFunction
Clausen(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:

source
FewSpecialFunctions.Ci_complexFunction
Ci_complex(z::Complex{T}) where {T <: AbstractFloat}

Complex cosine integral function used in Clausen function calculations. Supports any AbstractFloat type.

source
FewSpecialFunctions.f_nFunction
f_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 θ.

source
FewSpecialFunctions.F_clausenFunction
F_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.

source
FewSpecialFunctions.FermiDiracIntegralFunction
FermiDiracIntegral(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

source
FewSpecialFunctions.FermiDiracIntegralNormFunction
FermiDiracIntegralNorm(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

source
FewSpecialFunctions.MarcumQFunction
MarcumQ(μ::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

source
FewSpecialFunctions.dQdbFunction
dQdb(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.

source
FewSpecialFunctions.UFunction
U(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

source
FewSpecialFunctions.VFunction
V(a::T, x::T) where {T <: AbstractFloat}

Compute the parabolic cylinder function V(a,x). Supports any AbstractFloat type (e.g., Float32, Float64, BigFloat).

source
FewSpecialFunctions.WFunction
W(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).

source
FewSpecialFunctions.dUFunction
dU(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).

source
FewSpecialFunctions.dVFunction
dV(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).

source
FewSpecialFunctions.dWFunction
dW(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).

source