Module rgsl::gamma_beta::factorials
[−]
[src]
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
| choose |
This routine computes the combinatorial factor n choose m = n!/(m!(n-m)!) |
| choose_e |
This routine computes the combinatorial factor n choose m = n!/(m!(n-m)!) |
| doublefact |
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. |
| doublefact_e |
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. |
| fact |
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. |
| fact_e |
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. |
| lnchoose |
This routine computes the logarithm of n choose m. This is equivalent to the sum \log(n!) - \log(m!) - \log((n-m)!). |
| lnchoose_e |
This routine computes the logarithm of n choose m. This is equivalent to the sum \log(n!) - \log(m!) - \log((n-m)!). |
| lndoublefact |
This routine computes the logarithm of the double factorial of n, \log(n!!). |
| lndoublefact_e |
This routine computes the logarithm of the double factorial of n, \log(n!!). |
| lnfact |
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. |
| lnfact_e |
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. |
| taylorcoeff |
This routine computes the Taylor coefficient xn / n! for x >= 0, n >= 0. |
| taylorcoeff_e |
This routine computes the Taylor coefficient xn / n! for x >= 0, n >= 0. |