Logo ROOT   6.12/07
Reference Guide
Special functions

Special mathematical functions.

The naming and numbering of the functions is taken from Matt Austern, (Draft) Technical Report on Standard Library Extensions, N1687=04-0127, September 10, 2004

Author
Created by Andras Zsenei on Mon Nov 8 2004

Special Functions from MathCore

double ROOT::Math::erf (double x)
 Error function encountered in integrating the normal distribution. More...
 
double ROOT::Math::erfc (double x)
 Complementary error function. More...
 
double ROOT::Math::tgamma (double x)
 The gamma function is defined to be the extension of the factorial to real numbers. More...
 
double ROOT::Math::lgamma (double x)
 Calculates the logarithm of the gamma function. More...
 
double ROOT::Math::inc_gamma (double a, double x)
 Calculates the normalized (regularized) lower incomplete gamma function (lower integral) More...
 
double ROOT::Math::inc_gamma_c (double a, double x)
 Calculates the normalized (regularized) upper incomplete gamma function (upper integral) More...
 
double ROOT::Math::beta (double x, double y)
 Calculates the beta function. More...
 
double ROOT::Math::inc_beta (double x, double a, double b)
 Calculates the normalized (regularized) incomplete beta function. More...
 
double ROOT::Math::sinint (double x)
 Calculates the sine integral. More...
 
double ROOT::Math::cosint (double x)
 Calculates the real part of the cosine integral Re(Ci). More...
 

Special Functions from MathMore

double ROOT::Math::assoc_laguerre (unsigned n, double m, double x)
 Computes the generalized Laguerre polynomials for \( n \geq 0, m > -1 \). More...
 
double ROOT::Math::assoc_legendre (unsigned l, unsigned m, double x)
 Computes the associated Legendre polynomials. More...
 
double ROOT::Math::comp_ellint_1 (double k)
 Calculates the complete elliptic integral of the first kind. More...
 
double ROOT::Math::comp_ellint_2 (double k)
 Calculates the complete elliptic integral of the second kind. More...
 
double ROOT::Math::comp_ellint_3 (double n, double k)
 Calculates the complete elliptic integral of the third kind. More...
 
double ROOT::Math::conf_hyperg (double a, double b, double z)
 Calculates the confluent hypergeometric functions of the first kind. More...
 
double ROOT::Math::conf_hypergU (double a, double b, double z)
 Calculates the confluent hypergeometric functions of the second kind, known also as Kummer function of the second kind, it is related to the confluent hypergeometric functions of the first kind. More...
 
double ROOT::Math::cyl_bessel_i (double nu, double x)
 Calculates the modified Bessel function of the first kind (also called regular modified (cylindrical) Bessel function). More...
 
double ROOT::Math::cyl_bessel_j (double nu, double x)
 Calculates the (cylindrical) Bessel functions of the first kind (also called regular (cylindrical) Bessel functions). More...
 
double ROOT::Math::cyl_bessel_k (double nu, double x)
 Calculates the modified Bessel functions of the second kind (also called irregular modified (cylindrical) Bessel functions). More...
 
double ROOT::Math::cyl_neumann (double nu, double x)
 Calculates the (cylindrical) Bessel functions of the second kind (also called irregular (cylindrical) Bessel functions or (cylindrical) Neumann functions). More...
 
double ROOT::Math::ellint_1 (double k, double phi)
 Calculates the incomplete elliptic integral of the first kind. More...
 
double ROOT::Math::ellint_2 (double k, double phi)
 Calculates the complete elliptic integral of the second kind. More...
 
double ROOT::Math::ellint_3 (double n, double k, double phi)
 Calculates the complete elliptic integral of the third kind. More...
 
double ROOT::Math::expint (double x)
 Calculates the exponential integral. More...
 
double ROOT::Math::hyperg (double a, double b, double c, double x)
 Calculates Gauss' hypergeometric function. More...
 
double ROOT::Math::laguerre (unsigned n, double x)
 Calculates the Laguerre polynomials. More...
 
double ROOT::Math::legendre (unsigned l, double x)
 Calculates the Legendre polynomials. More...
 
double ROOT::Math::riemann_zeta (double x)
 Calculates the Riemann zeta function. More...
 
double ROOT::Math::sph_bessel (unsigned n, double x)
 Calculates the spherical Bessel functions of the first kind (also called regular spherical Bessel functions). More...
 
double ROOT::Math::sph_legendre (unsigned l, unsigned m, double theta)
 Computes the spherical (normalized) associated Legendre polynomials, or spherical harmonic without azimuthal dependence ( \(e^(im\phi)\)). More...
 
double ROOT::Math::sph_neumann (unsigned n, double x)
 Calculates the spherical Bessel functions of the second kind (also called irregular spherical Bessel functions or spherical Neumann functions). More...
 
double ROOT::Math::airy_Ai (double x)
 Calculates the Airy function Ai. More...
 
double ROOT::Math::airy_Bi (double x)
 Calculates the Airy function Bi. More...
 
double ROOT::Math::airy_Ai_deriv (double x)
 Calculates the derivative of the Airy function Ai. More...
 
double ROOT::Math::airy_Bi_deriv (double x)
 Calculates the derivative of the Airy function Bi. More...
 
double ROOT::Math::airy_zero_Ai (unsigned int s)
 Calculates the zeroes of the Airy function Ai. More...
 
double ROOT::Math::airy_zero_Bi (unsigned int s)
 Calculates the zeroes of the Airy function Bi. More...
 
double ROOT::Math::airy_zero_Ai_deriv (unsigned int s)
 Calculates the zeroes of the derivative of the Airy function Ai. More...
 
double ROOT::Math::airy_zero_Bi_deriv (unsigned int s)
 Calculates the zeroes of the derivative of the Airy function Bi. More...
 
double ROOT::Math::wigner_3j (int two_ja, int two_jb, int two_jc, int two_ma, int two_mb, int two_mc)
 Calculates the Wigner 3j coupling coefficients. More...
 
double ROOT::Math::wigner_6j (int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf)
 Calculates the Wigner 6j coupling coefficients. More...
 
double ROOT::Math::wigner_9j (int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf, int two_jg, int two_jh, int two_ji)
 Calculates the Wigner 9j coupling coefficients. More...
 
double ROOT::Math::expint_n (int n, double x)
 

Function Documentation

◆ airy_Ai()

double ROOT::Math::airy_Ai ( double  x)

Calculates the Airy function Ai.

\[ Ai(x) = \frac{1}{\pi} \int\limits_{0}^{\infty} \cos(xt + t^3/3) dt \]

For detailed description see Mathworld and Abramowitz&Stegun, Sect. 10.4. The implementation used is that of GSL.

Definition at line 384 of file SpecFuncMathMore.cxx.

◆ airy_Ai_deriv()

double ROOT::Math::airy_Ai_deriv ( double  x)

Calculates the derivative of the Airy function Ai.

\[ Ai(x) = \frac{1}{\pi} \int\limits_{0}^{\infty} \cos(xt + t^3/3) dt \]

For detailed description see Mathworld and Abramowitz&Stegun, Sect. 10.4. The implementation used is that of GSL.

Definition at line 400 of file SpecFuncMathMore.cxx.

◆ airy_Bi()

double ROOT::Math::airy_Bi ( double  x)

Calculates the Airy function Bi.

\[ Bi(x) = \frac{1}{\pi} \int\limits_{0}^{\infty} [\exp(xt-t^3/3) + \cos(xt + t^3/3)] dt \]

For detailed description see Mathworld and Abramowitz&Stegun, Sect. 10.4. The implementation used is that of GSL.

Definition at line 392 of file SpecFuncMathMore.cxx.

◆ airy_Bi_deriv()

double ROOT::Math::airy_Bi_deriv ( double  x)

Calculates the derivative of the Airy function Bi.

\[ Bi(x) = \frac{1}{\pi} \int\limits_{0}^{\infty} [\exp(xt-t^3/3) + \cos(xt + t^3/3)] dt \]

For detailed description see Mathworld and Abramowitz&Stegun, Sect. 10.4. The implementation used is that of GSL.

Definition at line 408 of file SpecFuncMathMore.cxx.

◆ airy_zero_Ai()

double ROOT::Math::airy_zero_Ai ( unsigned int  s)

Calculates the zeroes of the Airy function Ai.

\[ Ai(x) = \frac{1}{\pi} \int\limits_{0}^{\infty} \cos(xt + t^3/3) dt \]

For detailed description see Mathworld and Abramowitz&Stegun, Sect. 10.4. The implementation used is that of GSL.

Definition at line 416 of file SpecFuncMathMore.cxx.

◆ airy_zero_Ai_deriv()

double ROOT::Math::airy_zero_Ai_deriv ( unsigned int  s)

Calculates the zeroes of the derivative of the Airy function Ai.

\[ Ai(x) = \frac{1}{\pi} \int\limits_{0}^{\infty} \cos(xt + t^3/3) dt \]

For detailed description see Mathworld and Abramowitz&Stegun, Sect. 10.4. The implementation used is that of GSL.

Definition at line 432 of file SpecFuncMathMore.cxx.

◆ airy_zero_Bi()

double ROOT::Math::airy_zero_Bi ( unsigned int  s)

Calculates the zeroes of the Airy function Bi.

\[ Bi(x) = \frac{1}{\pi} \int\limits_{0}^{\infty} [\exp(xt-t^3/3) + \cos(xt + t^3/3)] dt \]

For detailed description see Mathworld and Abramowitz&Stegun, Sect. 10.4. The implementation used is that of GSL.

Definition at line 424 of file SpecFuncMathMore.cxx.

◆ airy_zero_Bi_deriv()

double ROOT::Math::airy_zero_Bi_deriv ( unsigned int  s)

Calculates the zeroes of the derivative of the Airy function Bi.

\[ Bi(x) = \frac{1}{\pi} \int\limits_{0}^{\infty} [\exp(xt-t^3/3) + \cos(xt + t^3/3)] dt \]

For detailed description see Mathworld and Abramowitz&Stegun, Sect. 10.4. The implementation used is that of GSL.

Definition at line 440 of file SpecFuncMathMore.cxx.

◆ assoc_laguerre()

double ROOT::Math::assoc_laguerre ( unsigned  n,
double  m,
double  x 
)

Computes the generalized Laguerre polynomials for \( n \geq 0, m > -1 \).

They are defined in terms of the confluent hypergeometric function. For integer values of m they can be defined in terms of the Laguerre polynomials \(L_n(x)\):

\[ L_{n}^{m}(x) = (-1)^{m} \frac{d^m}{dx^m} L_{n+m}(x) \]

For detailed description see Mathworld. The implementation used is that of GSL.

This function is an extension of C++0x, also consistent in GSL, Abramowitz and Stegun 1972 and MatheMathica that uses non-integer values for m. C++0x calls for 'int m', more restrictive than necessary. The definition for was incorrect in 'n1687.pdf', but fixed in n1836.pdf, the most recent draft as of 2007-07-01

Definition at line 41 of file SpecFuncMathMore.cxx.

◆ assoc_legendre()

double ROOT::Math::assoc_legendre ( unsigned  l,
unsigned  m,
double  x 
)

Computes the associated Legendre polynomials.

\[ P_{l}^{m}(x) = (1-x^2)^{m/2} \frac{d^m}{dx^m} P_{l}(x) \]

with \(m \geq 0\), \( l \geq m \) and \( |x|<1 \). There are two sign conventions for associated Legendre polynomials. As is the case with the above formula, some authors (e.g., Arfken 1985, pp. 668-669) omit the Condon-Shortley phase \((-1)^m\), while others include it (e.g., Abramowitz and Stegun 1972). One possible way to distinguish the two conventions is due to Abramowitz and Stegun (1972, p. 332), who use the notation

\[ P_{lm} (x) = (-1)^m P_{l}^{m} (x)\]

to distinguish the two. For detailed description see Mathworld. The implementation used is that of GSL.

The definition uses is the one of C++0x, \( P_{lm}\), while GSL and MatheMatica use the \(P_{l}^{m}\) definition. Note that C++0x and GSL definitions agree instead for the normalized associated Legendre polynomial, sph_legendre(l,m,theta).

Definition at line 52 of file SpecFuncMathMore.cxx.

◆ beta()

double ROOT::Math::beta ( double  x,
double  y 
)

Calculates the beta function.

\[ B(x,y) = \frac{\Gamma(x) \Gamma(y)}{\Gamma(x+y)} \]

for x>0 and y>0. For detailed description see Mathworld.

Definition at line 111 of file SpecFuncMathCore.cxx.

◆ comp_ellint_1()

double ROOT::Math::comp_ellint_1 ( double  k)

Calculates the complete elliptic integral of the first kind.

\[ K(k) = F(k, \pi / 2) = \int_{0}^{\pi /2} \frac{d \theta}{\sqrt{1 - k^2 \sin^2{\theta}}} \]

with \(0 \leq k^2 \leq 1\). For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 65 of file SpecFuncMathMore.cxx.

◆ comp_ellint_2()

double ROOT::Math::comp_ellint_2 ( double  k)

Calculates the complete elliptic integral of the second kind.

\[ E(k) = E(k , \pi / 2) = \int_{0}^{\pi /2} \sqrt{1 - k^2 \sin^2{\theta}} d \theta \]

with \(0 \leq k^2 \leq 1\). For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 76 of file SpecFuncMathMore.cxx.

◆ comp_ellint_3()

double ROOT::Math::comp_ellint_3 ( double  n,
double  k 
)

Calculates the complete elliptic integral of the third kind.

Complete elliptic integral of the third kind.

\[ \Pi (n, k, \pi / 2) = \int_{0}^{\pi /2} \frac{d \theta}{(1 - n \sin^2{\theta})\sqrt{1 - k^2 \sin^2{\theta}}} \]

with \(0 \leq k^2 \leq 1\). There are two sign conventions for elliptic integrals of the third kind. Some authors (Abramowitz and Stegun, Mathworld, C++ standard proposal) use the above formula, while others (GSL, Planetmath and CERNLIB) use the + sign in front of n in the denominator. In order to be C++ compliant, the present library uses the former convention. The implementation used is that of GSL.

There are two different definitions used for the elliptic integral of the third kind:

\[ P(\phi,k,n) = \int_0^\phi \frac{dt}{(1 + n \sin^2{t})\sqrt{1 - k^2 \sin^2{t}}} \]

and

\[ P(\phi,k,n) = \int_0^\phi \frac{dt}{(1 - n \sin^2{t})\sqrt{1 - k^2 \sin^2{t}}} \]

the former is adopted by

Definition at line 128 of file SpecFuncMathMore.cxx.

◆ conf_hyperg()

double ROOT::Math::conf_hyperg ( double  a,
double  b,
double  z 
)

Calculates the confluent hypergeometric functions of the first kind.

\[ _{1}F_{1}(a;b;z) = \frac{\Gamma(b)}{\Gamma(a)} \sum_{n=0}^{\infty} \frac{\Gamma(a+n)}{\Gamma(b+n)} \frac{z^n}{n!} \]

For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 139 of file SpecFuncMathMore.cxx.

◆ conf_hypergU()

double ROOT::Math::conf_hypergU ( double  a,
double  b,
double  z 
)

Calculates the confluent hypergeometric functions of the second kind, known also as Kummer function of the second kind, it is related to the confluent hypergeometric functions of the first kind.

\[ U(a,b,z) = \frac{ \pi}{ \sin{\pi b } } \left[ \frac{ _{1}F_{1}(a,b,z) } {\Gamma(a-b+1) } - \frac{ z^{1-b} { _{1}F_{1}}(a-b+1,2-b,z)}{\Gamma(a)} \right] \]

For detailed description see Mathworld. The implementation used is that of GSL. This function is not part of the C++ standard proposal

Definition at line 147 of file SpecFuncMathMore.cxx.

◆ cosint()

double ROOT::Math::cosint ( double  x)

Calculates the real part of the cosine integral Re(Ci).

For x<0, the imaginary part is i and has to be added by the user, for x>0 the imaginary part of Ci(x) is 0.

\[ Ci(x) = - \int_{x}^{\infty} \frac{\cos t}{t} dt = \gamma + \ln x + \int_{0}^{x} \frac{\cos t - 1}{t} dt\]

For detailed description see Mathworld. The implementation used is that of CERNLIB, based on Y.L. Luke, The special functions and their approximations, v.II, (Academic Press, New York l969) 325-326.

Definition at line 212 of file SpecFuncMathCore.cxx.

◆ cyl_bessel_i()

double ROOT::Math::cyl_bessel_i ( double  nu,
double  x 
)

Calculates the modified Bessel function of the first kind (also called regular modified (cylindrical) Bessel function).

\[ I_{\nu} (x) = i^{-\nu} J_{\nu}(ix) = \sum_{k=0}^{\infty} \frac{(\frac{1}{2}x)^{\nu + 2k}}{k! \Gamma(\nu + k + 1)} \]

for \(x>0, \nu > 0\). For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 158 of file SpecFuncMathMore.cxx.

◆ cyl_bessel_j()

double ROOT::Math::cyl_bessel_j ( double  nu,
double  x 
)

Calculates the (cylindrical) Bessel functions of the first kind (also called regular (cylindrical) Bessel functions).

\[ J_{\nu} (x) = \sum_{k=0}^{\infty} \frac{(-1)^k(\frac{1}{2}x)^{\nu + 2k}}{k! \Gamma(\nu + k + 1)} \]

For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 169 of file SpecFuncMathMore.cxx.

◆ cyl_bessel_k()

double ROOT::Math::cyl_bessel_k ( double  nu,
double  x 
)

Calculates the modified Bessel functions of the second kind (also called irregular modified (cylindrical) Bessel functions).

\[ K_{\nu} (x) = \frac{\pi}{2} i^{\nu + 1} (J_{\nu} (ix) + iN(ix)) = \left\{ \begin{array}{cl} \frac{\pi}{2} \frac{I_{-\nu}(x) - I_{\nu}(x)}{\sin{\nu \pi}} & \mbox{for non-integral $\nu$} \\ \frac{\pi}{2} \lim{\mu \to \nu} \frac{I_{-\mu}(x) - I_{\mu}(x)}{\sin{\mu \pi}} & \mbox{for integral $\nu$} \end{array} \right. \]

for \(x>0, \nu > 0\). For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 180 of file SpecFuncMathMore.cxx.

◆ cyl_neumann()

double ROOT::Math::cyl_neumann ( double  nu,
double  x 
)

Calculates the (cylindrical) Bessel functions of the second kind (also called irregular (cylindrical) Bessel functions or (cylindrical) Neumann functions).

\[ N_{\nu} (x) = Y_{\nu} (x) = \left\{ \begin{array}{cl} \frac{J_{\nu} \cos{\nu \pi}-J_{-\nu}(x)}{\sin{\nu \pi}} & \mbox{for non-integral $\nu$} \\ \lim{\mu \to \nu} \frac{J_{\mu} \cos{\mu \pi}-J_{-\mu}(x)}{\sin{\mu \pi}} & \mbox{for integral $\nu$} \end{array} \right. \]

For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 192 of file SpecFuncMathMore.cxx.

◆ ellint_1()

double ROOT::Math::ellint_1 ( double  k,
double  phi 
)

Calculates the incomplete elliptic integral of the first kind.

\[ F(k, \phi) = \int_{0}^{\phi} \frac{d \theta}{\sqrt{1 - k^2 \sin^2{\theta}}} \]

with \(0 \leq k^2 \leq 1\). For detailed description see Mathworld. The implementation used is that of GSL.

Parameters
k
phiangle in radians

Definition at line 204 of file SpecFuncMathMore.cxx.

◆ ellint_2()

double ROOT::Math::ellint_2 ( double  k,
double  phi 
)

Calculates the complete elliptic integral of the second kind.

\[ E(k , \phi) = \int_{0}^{\phi} \sqrt{1 - k^2 \sin^2{\theta}} d \theta \]

with \(0 \leq k^2 \leq 1\). For detailed description see Mathworld. The implementation used is that of GSL.

Parameters
k
phiangle in radians

Definition at line 216 of file SpecFuncMathMore.cxx.

◆ ellint_3()

double ROOT::Math::ellint_3 ( double  n,
double  k,
double  phi 
)

Calculates the complete elliptic integral of the third kind.

Incomplete elliptic integral of the third kind.

\[ \Pi (n, k, \phi) = \int_{0}^{\phi} \frac{d \theta}{(1 - n \sin^2{\theta})\sqrt{1 - k^2 \sin^2{\theta}}} \]

with \(0 \leq k^2 \leq 1\). There are two sign conventions for elliptic integrals of the third kind. Some authors (Abramowitz and Stegun, Mathworld, C++ standard proposal) use the above formula, while others (GSL, Planetmath and CERNLIB) use the + sign in front of n in the denominator. In order to be C++ compliant, the present library uses the former convention. The implementation used is that of GSL.

Parameters
n
k
phiangle in radians

There are two different definitions used for the elliptic integral of the third kind:

\[ P(\phi,k,n) = \int_0^\phi \frac{dt}{(1 + n \sin^2{t})\sqrt{1 - k^2 \sin^2{t}}} \]

and

\[ P(\phi,k,n) = \int_0^\phi \frac{dt}{(1 - n \sin^2{t})\sqrt{1 - k^2 \sin^2{t}}} \]

the former is adopted by

Definition at line 270 of file SpecFuncMathMore.cxx.

◆ erf()

double ROOT::Math::erf ( double  x)

Error function encountered in integrating the normal distribution.

\[ erf(x) = \frac{2}{\sqrt{\pi}} \int_{0}^{x} e^{-t^2} dt \]

For detailed description see Mathworld. The implementation used is that of GSL. This function is provided only for convenience, in case your standard C++ implementation does not support it. If it does, please use these standard version!

Definition at line 59 of file SpecFuncMathCore.cxx.

◆ erfc()

double ROOT::Math::erfc ( double  x)

Complementary error function.

\[ erfc(x) = 1 - erf(x) = \frac{2}{\sqrt{\pi}} \int_{x}^{\infty} e^{-t^2} dt \]

For detailed description see Mathworld. The implementation used is that of Cephes from S. Moshier.

Definition at line 44 of file SpecFuncMathCore.cxx.

◆ expint()

double ROOT::Math::expint ( double  x)

Calculates the exponential integral.

\[ Ei(x) = - \int_{-x}^{\infty} \frac{e^{-t}}{t} dt \]

For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 281 of file SpecFuncMathMore.cxx.

◆ expint_n()

double ROOT::Math::expint_n ( int  n,
double  x 
)

Definition at line 290 of file SpecFuncMathMore.cxx.

◆ hyperg()

double ROOT::Math::hyperg ( double  a,
double  b,
double  c,
double  x 
)

Calculates Gauss' hypergeometric function.

\[ _{2}F_{1}(a,b;c;x) = \frac{\Gamma(c)}{\Gamma(a) \Gamma(b)} \sum_{n=0}^{\infty} \frac{\Gamma(a+n)\Gamma(b+n)}{\Gamma(c+n)} \frac{x^n}{n!} \]

For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 310 of file SpecFuncMathMore.cxx.

◆ inc_beta()

double ROOT::Math::inc_beta ( double  x,
double  a,
double  b 
)

Calculates the normalized (regularized) incomplete beta function.

\[ B(x, a, b ) = \frac{ \int_{0}^{x} u^{a-1} (1-u)^{b-1} du } { B(a,b) } \]

for 0<=x<=1, a>0, and b>0. For detailed description see Mathworld. The implementation used is that of Cephes from S. Moshier.

Definition at line 115 of file SpecFuncMathCore.cxx.

◆ inc_gamma()

double ROOT::Math::inc_gamma ( double  a,
double  x 
)

Calculates the normalized (regularized) lower incomplete gamma function (lower integral)

\[ P(a, x) = \frac{ 1} {\Gamma(a) } \int_{0}^{x} t^{a-1} e^{-t} dt \]

For a detailed description see Mathworld. The implementation used is that of Cephes from S. Moshier. In this implementation both a and x must be positive. If a is negative 1.0 is returned for every x. This is correct only if a is negative integer. For a>0 and x<0 0 is returned (this is correct only for a>0 and x=0).

Definition at line 99 of file SpecFuncMathCore.cxx.

◆ inc_gamma_c()

double ROOT::Math::inc_gamma_c ( double  a,
double  x 
)

Calculates the normalized (regularized) upper incomplete gamma function (upper integral)

\[ Q(a, x) = \frac{ 1} {\Gamma(a) } \int_{x}^{\infty} t^{a-1} e^{-t} dt \]

For a detailed description see Mathworld. The implementation used is that of Cephes from S. Moshier. In this implementation both a and x must be positive. If a is negative, 0 is returned for every x. This is correct only if a is negative integer. For a>0 and x<0 1 is returned (this is correct only for a>0 and x=0).

Definition at line 103 of file SpecFuncMathCore.cxx.

◆ laguerre()

double ROOT::Math::laguerre ( unsigned  n,
double  x 
)

Calculates the Laguerre polynomials.

\[ P_{l}(x) = \frac{ e^x}{n!} \frac{d^n}{dx^n} (x^n - e^{-x}) \]

for \(x \geq 0 \) in the Rodrigues representation. They corresponds to the associated Laguerre polynomial of order m=0. See Abramowitz and Stegun, (22.5.16) For detailed description see Mathworld. The are implemented using the associated Laguerre polynomial of order m=0.

Definition at line 321 of file SpecFuncMathMore.cxx.

◆ legendre()

double ROOT::Math::legendre ( unsigned  l,
double  x 
)

Calculates the Legendre polynomials.

\[ P_{l}(x) = \frac{1}{2^l l!} \frac{d^l}{dx^l} (x^2 - 1)^l \]

for \(l \geq 0, |x|\leq1\) in the Rodrigues representation. For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 331 of file SpecFuncMathMore.cxx.

◆ lgamma()

double ROOT::Math::lgamma ( double  x)

Calculates the logarithm of the gamma function.

The implementation used is that of Cephes from S. Moshier.

Definition at line 74 of file SpecFuncMathCore.cxx.

◆ riemann_zeta()

double ROOT::Math::riemann_zeta ( double  x)

Calculates the Riemann zeta function.

\[ \zeta (x) = \left\{ \begin{array}{cl} \sum_{k=1}^{\infty}k^{-x} & \mbox{for $x > 1$} \\ 2^x \pi^{x-1} \sin{(\frac{1}{2}\pi x)} \Gamma(1-x) \zeta (1-x) & \mbox{for $x < 1$} \end{array} \right. \]

For detailed description see Mathworld. The implementation used is that of GSL.

CHECK WHETHER THE IMPLEMENTATION CALCULATES X<1

Definition at line 342 of file SpecFuncMathMore.cxx.

◆ sinint()

double ROOT::Math::sinint ( double  x)

Calculates the sine integral.

\[ Si(x) = - \int_{0}^{x} \frac{\sin t}{t} dt \]

For detailed description see Mathworld. The implementation used is that of CERNLIB, based on Y.L. Luke, The special functions and their approximations, v.II, (Academic Press, New York l969) 325-326.

Definition at line 122 of file SpecFuncMathCore.cxx.

◆ sph_bessel()

double ROOT::Math::sph_bessel ( unsigned  n,
double  x 
)

Calculates the spherical Bessel functions of the first kind (also called regular spherical Bessel functions).

\[ j_{n}(x) = \sqrt{\frac{\pi}{2x}} J_{n+1/2}(x) \]

For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 353 of file SpecFuncMathMore.cxx.

◆ sph_legendre()

double ROOT::Math::sph_legendre ( unsigned  l,
unsigned  m,
double  theta 
)

Computes the spherical (normalized) associated Legendre polynomials, or spherical harmonic without azimuthal dependence ( \(e^(im\phi)\)).

\[ Y_l^m(theta,0) = \sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_l^m(cos \theta) \]

for \(m \geq 0, l \geq m\), where the Condon-Shortley phase \((-1)^m\) is included in P_l^m(x) This function is consistent with both C++0x and GSL, even though there is a discrepancy in where to include the phase. There is no reference in Abramowitz and Stegun.

Definition at line 364 of file SpecFuncMathMore.cxx.

◆ sph_neumann()

double ROOT::Math::sph_neumann ( unsigned  n,
double  x 
)

Calculates the spherical Bessel functions of the second kind (also called irregular spherical Bessel functions or spherical Neumann functions).

\[ n_n(x) = y_n(x) = \sqrt{\frac{\pi}{2x}} N_{n+1/2}(x) \]

For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 376 of file SpecFuncMathMore.cxx.

◆ tgamma()

double ROOT::Math::tgamma ( double  x)

The gamma function is defined to be the extension of the factorial to real numbers.

\[ \Gamma(x) = \int_{0}^{\infty} t^{x-1} e^{-t} dt \]

For detailed description see Mathworld. The implementation used is that of Cephes from S. Moshier.

Definition at line 89 of file SpecFuncMathCore.cxx.

◆ wigner_3j()

double ROOT::Math::wigner_3j ( int  two_ja,
int  two_jb,
int  two_jc,
int  two_ma,
int  two_mb,
int  two_mc 
)

Calculates the Wigner 3j coupling coefficients.

(ja jb jc ma mb mc)

where ja,ma,...etc are integers or half integers. The function takes as input arguments only integers which corresponds to half integer units, e.g two_ja = 2 * ja

For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 448 of file SpecFuncMathMore.cxx.

◆ wigner_6j()

double ROOT::Math::wigner_6j ( int  two_ja,
int  two_jb,
int  two_jc,
int  two_jd,
int  two_je,
int  two_jf 
)

Calculates the Wigner 6j coupling coefficients.

(ja jb jc jd je jf)

where ja,jb,...etc are integers or half integers. The function takes as input arguments only integers which corresponds to half integer units, e.g two_ja = 2 * ja

For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 452 of file SpecFuncMathMore.cxx.

◆ wigner_9j()

double ROOT::Math::wigner_9j ( int  two_ja,
int  two_jb,
int  two_jc,
int  two_jd,
int  two_je,
int  two_jf,
int  two_jg,
int  two_jh,
int  two_ji 
)

Calculates the Wigner 9j coupling coefficients.

(ja jb jc jd je jf jg jh ji)

where ja,jb...etc are integers or half integers. The function takes as input arguments only integers which corresponds to half integer units, e.g two_ja = 2 * ja

For detailed description see Mathworld. The implementation used is that of GSL.

Definition at line 456 of file SpecFuncMathMore.cxx.