Module rgsl::gamma_beta::factorials

source ·
Expand description

Although factorials can be computed from the Gamma function, using the relation n! = \Gamma(n+1) for non-negative integer n, it is usually more efficient to call the functions in this section, particularly for small values of n, whose factorial values are maintained in hardcoded tables.

Functions

This routine computes the combinatorial factor n choose m = n!/(m!(n-m)!)
This routine computes the combinatorial factor n choose m = n!/(m!(n-m)!)
This routine computes the double factorial n!! = n(n-2)(n-4) \dots. The maximum value of n such that n!! is not considered an overflow is given by the macro SF_DOUBLEFACT_NMAX and is 297.
This routine computes the double factorial n!! = n(n-2)(n-4) \dots. The maximum value of n such that n!! is not considered an overflow is given by the macro SF_DOUBLEFACT_NMAX and is 297.
This routine computes the factorial n!. The factorial is related to the Gamma function by n! = \Gamma(n+1). The maximum value of n such that n! is not considered an overflow is given by the macro SF_FACT_NMAX and is 170.
This routine computes the factorial n!. The factorial is related to the Gamma function by n! = \Gamma(n+1). The maximum value of n such that n! is not considered an overflow is given by the macro SF_FACT_NMAX and is 170.
This routine computes the logarithm of n choose m. This is equivalent to the sum \log(n!) - \log(m!) - \log((n-m)!).
This routine computes the logarithm of n choose m. This is equivalent to the sum \log(n!) - \log(m!) - \log((n-m)!).
This routine computes the logarithm of the double factorial of n, \log(n!!).
This routine computes the logarithm of the double factorial of n, \log(n!!).
This routine computes the logarithm of the factorial of n, \log(n!). The algorithm is faster than computing \ln(\Gamma(n+1)) via gsl_sf_lngamma for n < 170, but defers for larger n.
This routine computes the logarithm of the factorial of n, \log(n!). The algorithm is faster than computing \ln(\Gamma(n+1)) via gsl_sf_lngamma for n < 170, but defers for larger n.
This routine computes the Taylor coefficient x^n / n! for x >= 0, n >= 0.
This routine computes the Taylor coefficient x^n / n! for x >= 0, n >= 0.