Returns the base e (2.718...) logarithm of the absolute value of the gamma function of the argument.
For reals, lgamma is equivalent to log(fabs(tgamma(x)).
x | logΓ(x) | invalid? |
---|---|---|
NaN | NaN | yes |
integer <= 0 | +∞ | yes |
1, 2 | +0.0 | no |
±∞ | +∞ | no |
Generalizes the factorial function to real and complex numbers. Like x!, Γ(x+1) = x*Γ(x).
Mathematically, if z.re > 0 then Γ(z) =∫ 0∞tz-1e-tdt
This function is equivalent to tgamma() in the C programming language.
x | Γ(x) | invalid? |
---|---|---|
NAN | NAN | yes |
±0.0 | ±∞ | yes |
integer > 0 | (x-1)! | no |
integer < 0 | NAN | yes |
+∞ | +∞ | no |
-∞ | NAN | yes |