Inhaltsverzeichnis

tgamma()

#include <cmath>

double tgamma (double x) 

Liefert den Wert der Gammafunktion $\Gamma(x) = \int_0^\infty t^{x-1}e^{-t} dt$ für $x \neq -n$. Für nichtnegative ganzzahlige Argumente gilt $\Gamma(n+1) = n!$.

Parameter

x Gleitkommazahl ($x \neq -n$ mit $n \in \mathbb{N}$)

Ergebnis

Rückgabewert: $\Gamma(x)$.

Siehe auch

lgamma().

Beispiel

tgamma.cpp
#include <cmath>
#include <iostream>
 
int main()
{
  std::cout << "Gamma(4.0) = " << std::tgamma(4.0) << '\n';
}