-
Special functions
- Airy functions
- Bessel functions
- Clausen functions
- Coulomb functions
- Coupling coefficients
- The Dawson function
- Debye functions
- Dilogarithms
- Elementary operations
- Elliptic integrals
- Error function
- Exponential functions
- Exponential integrals
- Fermi-Dirac function
- Gamma function
- Gegenbauer functions aka Ultraspherical polynomials
- Hypergeometric functions
- Laguerre functions
- Lambert W functions
- Legendre functions
- Associated Legendre functions and Spherical Harmonics
- Logarithm and related functions
- Power function
- Psi (Digamma) function
- Synchrotron functions
- Transport functions
- Trigonometric functions
- Zeta functions
package gsl
Module Gsl.SfSource
Special functions
The library includes routines for calculating the values of Airy functions, Bessel functions, Clausen functions, Coulomb functions, Coupling coefficients, The Dawson function, Debye functions, Dilogarithms, Elliptic integrals, Error, Exponential functions, Exponential integrals, Fermi-Dirac function, Gamma function, Gegenbauer functions aka Ultraspherical polynomials, Hypergeometric functions, Laguerre functions, Lambert W functions, Legendre functions and Associated Legendre functions and Spherical Harmonics, log, Power function, Psi (Digamma) function, Synchrotron functions, Transport functions, Trigonometric functions, and Zeta functions.
Each routine also computes an estimate of the numerical error in the calculated value of the function.
Airy functions
Bessel functions
Clausen functions
Coulomb functions
Coupling coefficients
The Dawson function
Debye functions
Dilogarithms
Elementary operations
Elliptic integrals
Error function
Exponential functions
exp x computes the exponential function eˣ using GSL semantics and error checking.
exp_e10 x computes the exponential eˣ and returns a result with extended range. This function may be useful if the value of eˣ would overflow the numeric range of double.
exp_mult x y exponentiate x and multiply by the factor y to return the product y eˣ.
Same as exp_e10 but return a result with extended numeric range.
expm1 x compute the quantity eˣ-1 using an algorithm that is accurate for small x.
exprel x compute the quantity (eˣ-1)/x using an algorithm that is accurate for small x. For small x the algorithm is based on the expansion (eˣ-1)/x = 1 + x/2 + x²/(2*3) + x³/(2*3*4) + ⋯
exprel_2 x compute the quantity 2(eˣ-1-x)/x² using an algorithm that is accurate for small x. For small x the algorithm is based on the expansion 2(eˣ-1-x)/x^2 = 1 + x/3 + x²/(3*4) + x³/(3*4*5) + ⋯
Exponential integrals
Fermi-Dirac function
Gamma function
Gegenbauer functions aka Ultraspherical polynomials
Gegenbauer functions are defined in DLMF.
gegenpoly_1 l x = C₁⁽ˡ⁾(x).
gegenpoly_2 l x = C₂⁽ˡ⁾(x).
gegenpoly_3 l x = C₃⁽ˡ⁾(x).
gegenpoly_n n l x = Cₙ⁽ˡ⁾(x). Constraints: l > -1/2, n ≥ 0.
gegenpoly_array l x c computes an array of Gegenbauer polynomials c.(n) = Cₙ⁽ˡ⁾(x) for n = 0, 1, 2,̣..., Array.length c - 1. Constraints: l > -1/2.
Hypergeometric functions
hyperg_0F1 c x computes the hypergeometric function ₀F₁(c; x).
hyperg_1F1_int m n x computes the confluent hypergeometric function ₁F₁(m;n;x) = M(m,n,x) for integer parameters m, n.
hyperg_1F1 a b x computes the confluent hypergeometric function ₁F₁(a;b;x) = M(a,b,x) for general parameters a, b.
hyperg_U_int m n x computes the confluent hypergeometric function U(m,n,x) for integer parameters m, n.
hyperg_U_int_e10 m n x computes the confluent hypergeometric function U(m,n,x) for integer parameters m, n with extended range.
hyperg_U a b x computes the confluent hypergeometric function U(a,b,x).
hyperg_U_e10 a b x computes the confluent hypergeometric function U(a,b,x) with extended range.
hyperg_2F1 a b c x computes the Gauss hypergeometric function ₂F₁(a,b,c,x) = F(a,b,c,x) for |x| < 1.
If the arguments (a,b,c,x) are too close to a singularity then the function can raise the exception Error.Gsl_exn(Error.EMAXITER, _) when the series approximation converges too slowly. This occurs in the region of x=1, c - a - b ∈ ℤ.
hyperg_2F1_conj aR aI c x computes the Gauss hypergeometric function ₂F₁(aR + i aI, aR - i aI, c, x) with complex parameters for |x| < 1.
hyperg_2F1_renorm a b c x computes the renormalized Gauss hypergeometric function ₂F₁(a,b,c,x) / Γ(c) for |x| < 1.
hyperg_2F1_conj_renorm aR aI c x computes the renormalized Gauss hypergeometric function ₂F₁(aR + i aI, aR - i aI, c, x) / Γ(c) for |x| < 1.
hyperg_2F0 a b x computes the hypergeometric function ₂F₀(a,b,x). The series representation is a divergent hypergeometric series. However, for x < 0 we have ₂F₀(a,b,x) = (-1/x)ᵃ U(a,1+a-b,-1/x)
Laguerre functions
Lambert W functions
Legendre functions
Associated Legendre functions and Spherical Harmonics
type legendre_t = | Schmidt(*Specifies the computation of the Schmidt semi-normalized associated Legendre polynomials Sₗᵐ(x).
*)| Spharm(*Specifies the computation of the spherical harmonic associated Legendre polynomials Yₗᵐ(x).
*)| Full(*Specifies the computation of the fully normalized associated Legendre polynomials Nₗᵐ(x).
*)| None(*Specifies the computation of the unnormalized associated Legendre polynomials Pₗᵐ(x).
*)
Normalization of Legendre functions. See the GSL documentation.
legendre_array norm lmax x result calculate all normalized associated Legendre polynomials for 0 ≤ l ≤ lmax and 0 ≤ m ≤ l for |x| ≤ 1. The norm parameter specifies which normalization is used. The normalized Pₗᵐ(x) values are stored in result, whose minimum size can be obtained from calling legendre_array_n. The array index of Pₗᵐ(x) is obtained from calling legendre_array_index(l, m). To include or exclude the Condon-Shortley phase factor of (-1)ᵐ, set the parameter csphase to either -1 or 1 respectively in the _e function. This factor is included by default.
legendre_array_n lmax returns the minimum array size for maximum degree lmax needed for the array versions of the associated Legendre functions. Size is calculated as the total number of Pₗᵐ(x) functions, plus extra space for precomputing multiplicative factors used in the recurrence relations.
legendre_array_index l m returns the index into the result array of the legendre_array, legendre_deriv_array, legendre_deriv_alt_array, legendre_deriv2_array, and !legendre_deriv2_alt_array corresponding to Pₗᵐ(x), ∂ₓPₗᵐ(x), or ∂ₓ²Pₗₗᵐ(x). The index is given by l(l+1)/2 + m.
legendre_Plm l m x and legendre_Plm_e l m x compute the associated Legendre polynomial Pₗᵐ(x) for m ≥ 0, l ≥ m, |x| ≤ 1.
legendre_sphPlm l m x and legendre_Plm_e compute the normalized associated Legendre polynomial √((2l+1)/(4\pi)) √((l-m)!/(l+m)!) Pₗᵐ(x) suitable for use in spherical harmonics. The parameters must satisfy m ≥ 0, l ≥ m, |x| ≤ 1. Theses routines avoid the overflows that occur for the standard normalization of Pₗᵐ(x).
Logarithm and related functions
Power function
Psi (Digamma) function
Synchrotron functions
Transport functions
Trigonometric functions
Zeta functions
-
Special functions
- Airy functions
- Bessel functions
- Clausen functions
- Coulomb functions
- Coupling coefficients
- The Dawson function
- Debye functions
- Dilogarithms
- Elementary operations
- Elliptic integrals
- Error function
- Exponential functions
- Exponential integrals
- Fermi-Dirac function
- Gamma function
- Gegenbauer functions aka Ultraspherical polynomials
- Hypergeometric functions
- Laguerre functions
- Lambert W functions
- Legendre functions
- Associated Legendre functions and Spherical Harmonics
- Logarithm and related functions
- Power function
- Psi (Digamma) function
- Synchrotron functions
- Transport functions
- Trigonometric functions
- Zeta functions