|
1 | 1 | % File src/library/base/man/Special.Rd
|
2 | 2 | % Part of the R package, https://www.R-project.org
|
3 |
| -% Copyright 1995-2022 R Core Team |
| 3 | +% Copyright 1995-2025 R Core Team |
4 | 4 | % Distributed under GPL 2 or later
|
5 | 5 |
|
6 | 6 | \name{Special}
|
@@ -62,7 +62,15 @@ lfactorial(x)
|
62 | 62 | gamma function. The gamma function is defined by
|
63 | 63 | (\bibcite{Abramowitz and Stegun section 6.1.1, page 255})
|
64 | 64 | \deqn{\Gamma(x) = \int_0^\infty t^{x-1} e^{-t} dt}{\Gamma(x) = integral_0^Inf t^(x-1) exp(-t) dt}
|
65 |
| - for all real \code{x} except zero and negative integers (when |
| 65 | + for all \eqn{x > 0}, from which the recursions \eqn{\Gamma(x+1) = |
| 66 | + x\Gamma(x)} and then \eqn{\Gamma(x+n) = (x+n-1)(x+n-2)\cdots x \Gamma(x)} |
| 67 | + for all non-negative integers \eqn{n}. Solving for \eqn{\Gamma(x)} and |
| 68 | + analytic continuation leads to the expression for non-integer negative real numbers, |
| 69 | + \deqn{\Gamma(x) = \frac{\Gamma(x + n)}{(x + n -1) \cdots (x + 1)x}, \ n \in \mathbb{Z}^{+}, -n < x < 0,% |
| 70 | + }{\Gamma(x) = \Gamma(x + n)/((x + n -1) ... (x + 1)x), n in N, -n < x < 0,} |
| 71 | + see \bibcite{Abramowitz and Stegun (6.1.16 or 6.1.22, page 256)}. |
| 72 | + % |
| 73 | + The gamma function is not defined for zero and negative integers (when |
66 | 74 | \code{NaN} is returned). There will be a warning on possible loss of
|
67 | 75 | precision for values which are too close (within about
|
68 | 76 | \eqn{10^{-8}}{1e-8}) to a negative integer less than \samp{-10}.
|
|
0 commit comments