#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!$.
x | Gleitkommazahl ($x \neq -n$ mit $n \in \mathbb{N}$) |
Rückgabewert: $\Gamma(x)$.
#include <cmath> #include <iostream> int main() { std::cout << "Gamma(4.0) = " << std::tgamma(4.0) << '\n'; }