Gsl.Sf
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.
val airy_Ai : float -> Fun.mode -> float
val airy_Ai_e : float -> Fun.mode -> Fun.result
val airy_Bi : float -> Fun.mode -> float
val airy_Bi_e : float -> Fun.mode -> Fun.result
val airy_Ai_scaled : float -> Fun.mode -> float
val airy_Ai_scaled_e : float -> Fun.mode -> Fun.result
val airy_Bi_scaled : float -> Fun.mode -> float
val airy_Bi_scaled_e : float -> Fun.mode -> Fun.result
val airy_Ai_deriv : float -> Fun.mode -> float
val airy_Ai_deriv_e : float -> Fun.mode -> Fun.result
val airy_Bi_deriv : float -> Fun.mode -> float
val airy_Bi_deriv_e : float -> Fun.mode -> Fun.result
val airy_Ai_deriv_scaled : float -> Fun.mode -> float
val airy_Ai_deriv_scaled_e : float -> Fun.mode -> Fun.result
val airy_Bi_deriv_scaled : float -> Fun.mode -> float
val airy_Bi_deriv_scaled_e : float -> Fun.mode -> Fun.result
val airy_zero_Ai_e : int -> Fun.result
val airy_zero_Bi_e : int -> Fun.result
val bessel_J0_e : float -> Fun.result
val bessel_J1_e : float -> Fun.result
val bessel_Jn_e : int -> float -> Fun.result
val bessel_Y0_e : float -> Fun.result
val bessel_Y1_e : float -> Fun.result
val bessel_Yn_e : int -> float -> Fun.result
val bessel_I0_e : float -> Fun.result
val bessel_I1_e : float -> Fun.result
val bessel_In_e : int -> float -> Fun.result
val bessel_K0_e : float -> Fun.result
val bessel_K1_e : float -> Fun.result
val bessel_Kn_e : int -> float -> Fun.result
val bessel_I0_scaled_e : float -> Fun.result
val bessel_I1_scaled_e : float -> Fun.result
val bessel_In_scaled_e : int -> float -> Fun.result
val bessel_K0_scaled_e : float -> Fun.result
val bessel_K1_scaled_e : float -> Fun.result
val bessel_Kn_scaled_e : int -> float -> Fun.result
val bessel_j0_e : float -> Fun.result
val bessel_j1_e : float -> Fun.result
val bessel_j2_e : float -> Fun.result
val bessel_jl_e : int -> float -> Fun.result
val bessel_y0_e : float -> Fun.result
val bessel_y1_e : float -> Fun.result
val bessel_y2_e : float -> Fun.result
val bessel_yl_e : int -> float -> Fun.result
val bessel_i0_scaled_e : float -> Fun.result
val bessel_i1_scaled_e : float -> Fun.result
val bessel_il_scaled_e : int -> float -> Fun.result
val bessel_k0_scaled_e : float -> Fun.result
val bessel_k1_scaled_e : float -> Fun.result
val bessel_kl_scaled_e : int -> float -> Fun.result
val bessel_Jnu_e : float -> float -> Fun.result
val bessel_sequence_Jnu_e : float -> Fun.mode -> float array -> unit
val bessel_Ynu_e : float -> float -> Fun.result
val bessel_Inu_e : float -> float -> Fun.result
val bessel_Inu_scaled_e : float -> float -> Fun.result
val bessel_Knu_e : float -> float -> Fun.result
val bessel_lnKnu_e : float -> float -> Fun.result
val bessel_Knu_scaled_e : float -> float -> Fun.result
val bessel_zero_J0_e : int -> Fun.result
val bessel_zero_J1_e : int -> Fun.result
val bessel_zero_Jnu_e : float -> int -> Fun.result
val clausen_e : float -> Fun.result
val hydrogenicR_1_e : float -> float -> Fun.result
val hydrogenicR_e : int -> int -> float -> float -> Fun.result
val coulomb_CL_e : float -> float -> Fun.result
val dawson_e : float -> Fun.result
val debye_1_e : float -> Fun.result
val debye_2_e : float -> Fun.result
val debye_3_e : float -> Fun.result
val debye_4_e : float -> Fun.result
val debye_5_e : float -> Fun.result
val debye_6_e : float -> Fun.result
val dilog_e : float -> Fun.result
val complex_dilog_xy_e : float -> float -> Fun.result * Fun.result
val complex_dilog_e : float -> float -> Fun.result * Fun.result
val complex_spence_xy_e : float -> float -> Fun.result * Fun.result
val multiply_e : float -> float -> Fun.result
val multiply_err_e : x:float -> dx:float -> y:float -> dy:float -> Fun.result
val ellint_Kcomp : float -> Fun.mode -> float
val ellint_Kcomp_e : float -> Fun.mode -> Fun.result
val ellint_Ecomp : float -> Fun.mode -> float
val ellint_Ecomp_e : float -> Fun.mode -> Fun.result
val ellint_Pcomp : float -> float -> Fun.mode -> float
val ellint_Pcomp_e : float -> float -> Fun.mode -> Fun.result
val ellint_Dcomp : float -> Fun.mode -> float
val ellint_Dcomp_e : float -> Fun.mode -> Fun.result
val ellint_F : float -> float -> Fun.mode -> float
val ellint_F_e : float -> float -> Fun.mode -> Fun.result
val ellint_E : float -> float -> Fun.mode -> float
val ellint_E_e : float -> float -> Fun.mode -> Fun.result
val ellint_P : float -> float -> float -> Fun.mode -> float
val ellint_P_e : float -> float -> float -> Fun.mode -> Fun.result
val ellint_D : float -> float -> Fun.mode -> float
val ellint_D_e : float -> float -> Fun.mode -> Fun.result
val ellint_RC : float -> float -> Fun.mode -> float
val ellint_RC_e : float -> float -> Fun.mode -> Fun.result
val ellint_RD : float -> float -> float -> Fun.mode -> float
val ellint_RD_e : float -> float -> float -> Fun.mode -> Fun.result
val ellint_RF : float -> float -> float -> Fun.mode -> float
val ellint_RF_e : float -> float -> float -> Fun.mode -> Fun.result
val ellint_RJ : float -> float -> float -> float -> Fun.mode -> float
val ellint_RJ_e : float -> float -> float -> float -> Fun.mode -> Fun.result
val erf_e : float -> Fun.result
val erfc_e : float -> Fun.result
val log_erfc_e : float -> Fun.result
val erf_Z_e : float -> Fun.result
val erf_Q_e : float -> Fun.result
val exp_e : float -> Fun.result
exp x
computes the exponential function eˣ using GSL semantics and error checking.
val exp_e10 : float -> Fun.result_e10
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.
val exp_mult_e : float -> float -> Fun.result
exp_mult x y
exponentiate x
and multiply by the factor y
to return the product y eˣ.
val exp_mult_e10 : float -> float -> Fun.result_e10
Same as exp_e10
but return a result with extended numeric range.
val expm1_e : float -> Fun.result
expm1 x
compute the quantity eˣ-1 using an algorithm that is accurate for small x
.
val exprel_e : float -> Fun.result
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) + ⋯
val exprel_2_e : float -> Fun.result
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) + ⋯
val exprel_n_e : int -> float -> Fun.result
val exp_err_e : x:float -> dx:float -> Fun.result
val exp_err_e10 : x:float -> dx:float -> Fun.result_e10
val exp_mult_err_e : x:float -> dx:float -> y:float -> dy:float -> Fun.result
val exp_mult_err_e10_e :
x:float ->
dx:float ->
y:float ->
dy:float ->
Fun.result_e10
val expint_E1_e : float -> Fun.result
val expint_E2_e : float -> Fun.result
val expint_E1_scaled_e : float -> Fun.result
val expint_E2_scaled_e : float -> Fun.result
val expint_Ei_e : float -> Fun.result
val expint_Ei_scaled_e : float -> Fun.result
val expint_3_e : float -> Fun.result
val atanint_e : float -> Fun.result
val fermi_dirac_m1_e : float -> Fun.result
val fermi_dirac_0_e : float -> Fun.result
val fermi_dirac_1_e : float -> Fun.result
val fermi_dirac_2_e : float -> Fun.result
val fermi_dirac_int_e : int -> float -> Fun.result
val fermi_dirac_mhalf_e : float -> Fun.result
val fermi_dirac_half_e : float -> Fun.result
val fermi_dirac_3half_e : float -> Fun.result
val fermi_dirac_inc_0_e : float -> float -> Fun.result
val gamma_e : float -> Fun.result
val lngamma_e : float -> Fun.result
val lngamma_sgn_e : float -> Fun.result * float
val gammastar_e : float -> Fun.result
val gammainv_e : float -> Fun.result
val lngamma_complex_e : float -> float -> Fun.result * Fun.result
val taylorcoeff_e : int -> float -> Fun.result
val fact_e : int -> Fun.result
val doublefact_e : int -> Fun.result
val lnfact_e : int -> Fun.result
val lndoublefact_e : int -> Fun.result
val choose_e : int -> int -> Fun.result
val lnchoose_e : int -> int -> Fun.result
val poch_e : float -> float -> Fun.result
val lnpoch_e : float -> float -> Fun.result
val lnpoch_sgn_e : float -> float -> Fun.result * float
val pochrel_e : float -> float -> Fun.result
val gamma_inc_Q_e : float -> float -> Fun.result
val gamma_inc_P_e : float -> float -> Fun.result
val gamma_inc_e : float -> float -> Fun.result
val beta_e : float -> float -> Fun.result
val lnbeta_e : float -> float -> Fun.result
val lnbeta_sgn_e : float -> float -> Fun.result * float
val beta_inc_e : float -> float -> float -> Fun.result
Gegenbauer functions are defined in DLMF.
val gegenpoly_1_e : float -> float -> Fun.result
gegenpoly_1 l x
= C₁⁽ˡ⁾(x).
val gegenpoly_2_e : float -> float -> Fun.result
gegenpoly_2 l x
= C₂⁽ˡ⁾(x).
val gegenpoly_3_e : float -> float -> Fun.result
gegenpoly_3 l x
= C₃⁽ˡ⁾(x).
val gegenpoly_n_e : int -> float -> float -> Fun.result
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.
val hyperg_0F1_e : c:float -> float -> Fun.result
hyperg_0F1 c x
computes the hypergeometric function ₀F₁(c; x).
val hyperg_1F1_int_e : m:int -> n:int -> float -> Fun.result
hyperg_1F1_int m n x
computes the confluent hypergeometric function ₁F₁(m;n;x) = M(m,n,x) for integer parameters m
, n
.
val hyperg_1F1_e : a:float -> b:float -> float -> Fun.result
hyperg_1F1 a b x
computes the confluent hypergeometric function ₁F₁(a;b;x) = M(a,b,x) for general parameters a
, b
.
val hyperg_U_int_e : m:int -> n:int -> float -> Fun.result
hyperg_U_int m n x
computes the confluent hypergeometric function U(m,n,x) for integer parameters m
, n
.
val hyperg_U_int_e10 : m:int -> n:int -> float -> Fun.result_e10
hyperg_U_int_e10 m n x
computes the confluent hypergeometric function U(m,n,x) for integer parameters m
, n
with extended range.
val hyperg_U_e : a:float -> b:float -> float -> Fun.result
hyperg_U a b x
computes the confluent hypergeometric function U(a,b,x).
val hyperg_U_e10 : a:float -> b:float -> float -> Fun.result_e10
hyperg_U_e10 a b x
computes the confluent hypergeometric function U(a,b,x) with extended range.
val hyperg_2F1_e : a:float -> b:float -> c:float -> float -> Fun.result
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
∈ ℤ.
val hyperg_2F1_conj_e : aR:float -> aI:float -> c:float -> float -> Fun.result
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.
val hyperg_2F1_renorm_e : a:float -> b:float -> c:float -> float -> Fun.result
hyperg_2F1_renorm a b c x
computes the renormalized Gauss hypergeometric function ₂F₁(a,b,c,x) / Γ(c) for |x| < 1.
val hyperg_2F1_conj_renorm_e :
aR:float ->
aI:float ->
c:float ->
float ->
Fun.result
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.
val hyperg_2F0_e : a:float -> b:float -> float -> Fun.result
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)
val laguerre_1_e : a:float -> float -> Fun.result
val laguerre_2_e : a:float -> float -> Fun.result
val laguerre_3_e : a:float -> float -> Fun.result
val laguerre_n_e : n:int -> a:float -> float -> Fun.result
val lambert_W0_e : float -> Fun.result
val lambert_Wm1_e : float -> Fun.result
val legendre_P1_e : float -> Fun.result
val legendre_P2_e : float -> Fun.result
val legendre_P3_e : float -> Fun.result
val legendre_Pl_e : int -> float -> Fun.result
val legendre_Q0_e : float -> Fun.result
val legendre_Q1_e : float -> Fun.result
val legendre_Ql_e : int -> float -> Fun.result
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.
val legendre_array : legendre_t -> int -> float -> float array -> unit
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.
val legendre_Plm_e : int -> int -> float -> Fun.result
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
.
val legendre_sphPlm_e : int -> int -> float -> Fun.result
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).
val log_e : float -> Fun.result
val log_abs_e : float -> Fun.result
val log_complex_e : float -> float -> Fun.result * Fun.result
val log_1plusx_e : float -> Fun.result
val log_1plusx_mx_e : float -> Fun.result
val pow_int_e : float -> int -> Fun.result
val psi_int_e : int -> Fun.result
val psi_e : float -> Fun.result
val psi_1piy_e : float -> Fun.result
val psi_complex_e : float -> float -> Fun.result * Fun.result
val psi_1_int_e : int -> Fun.result
val psi_1_e : float -> Fun.result
val psi_n_e : int -> float -> Fun.result
val synchrotron_1_e : float -> Fun.result
val synchrotron_2_e : float -> Fun.result
val transport_2_e : float -> Fun.result
val transport_3_e : float -> Fun.result
val transport_4_e : float -> Fun.result
val transport_5_e : float -> Fun.result
val sin_e : float -> Fun.result
val cos_e : float -> Fun.result
val hypot_e : float -> float -> Fun.result
val sinc_e : float -> Fun.result
val complex_sin_e : float -> float -> Fun.result * Fun.result
val complex_cos_e : float -> float -> Fun.result * Fun.result
val complex_logsin_e : float -> float -> Fun.result * Fun.result
val lnsinh_e : float -> Fun.result
val lncosh_e : float -> Fun.result
val rect_of_polar : r:float -> theta:float -> Fun.result * Fun.result
val polar_of_rect : x:float -> y:float -> Fun.result * Fun.result
val sin_err_e : float -> dx:float -> Fun.result
val cos_err_e : float -> dx:float -> Fun.result
val zeta_int_e : int -> Fun.result
val zeta_e : float -> Fun.result
val hzeta_e : float -> float -> Fun.result
val eta_int_e : int -> Fun.result
val eta_e : float -> Fun.result