Skip to content

gamma

Gamma function Γ(x).

v = gamma(x)

Returns the gamma function Γ(x) — the analytic extension of the factorial: Γ(n+1) = n! for non-negative integer n. Defined for all real x except non-positive integers (poles).

gamma(5) % 24 (= 4!)
gamma(0.5) % 1.7725 (= √π)
  • gammaln — Natural logarithm of the gamma function, ln(|Γ(x)|).
  • gammainc — Lower incomplete gamma function (regularized).
  • gammaincinv — Inverse of the regularized incomplete gamma function.
  • polygamma — Polygamma function ψ^(k)(x).
  • fact — Factorial.