std::tgamma
Aus cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
definiert in Header <cmath>
|
||
float tgamma( float arg ); |
(seit C++11) | |
double tgamma( double arg ); |
(seit C++11) | |
long double tgamma( long double arg ); |
(seit C++11) | |
double tgamma( Integral arg ); |
(seit C++11) | |
Berechnet den Gamma-Funktion der
arg
.Original:
Computes the Gamma-Funktion of
arg
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Inhaltsverzeichnis |
[Bearbeiten] Parameter
arg | - | Floating-Point-Wert
Original: floating point value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[Bearbeiten] Rückgabewert
Der Wert der Gammafunktion
0targ-1
e-t dt .
arg
, das heißt ∫∞0targ-1
e-t dt .
Original:
The value of the gamma function of
0targ-1
e-t dt.
arg
, that is ∫∞0targ-1
e-t dt.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Wenn
arg
eine natürliche Zahl ist, ist std::tgamma(arg) die Fakultät arg-1
.Original:
If
arg
is a natural number, std::tgamma(arg) is the factorial of arg-1
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Ausnahmen
Wenn
arg
negativ ist, kann Domain-Fehler auftreten, und FE_INVALID angehoben werden kann .Original:
If
arg
is negative, domain error may occur and FE_INVALID may be raised.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Wenn
arg
Null ist, kann pole Fehler auftreten und FE_DIVBYZERO angehoben werden kann .Original:
If
arg
is zero, pole error may occur and FE_DIVBYZERO may be raised.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Wenn
arg
zu groß ist, können die Reichweite Fehler auftreten und FE_OVERFLOW angehoben werden kann .Original:
If
arg
is too large, range error may occur and FE_OVERFLOW may be raised.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Wenn
arg
zu klein ist, können die Reichweite Fehler auftreten und FE_UNDERFLOW angehoben werden kann .Original:
If
arg
is too small, range error may occur and FE_UNDERFLOW may be raised.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Notes
Viele Implementierungen berechnet die genaue Integer-Domain-faktoriellen, wenn das Argument eine hinreichend kleine Zahl .
Original:
Many implementations calculate the exact integer-domain factorial if the argument is a sufficiently small integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Beispiel
#include <iostream> #include <cmath> double factorial(double arg) { return std::tgamma(arg + 1); } int main() { std::cout << "The factorial of 5 is " << factorial(5) << '\n' << "The factorial of 100 is " << factorial(100) << '\n'; }
Output:
The factorial of 5 is 120 The factorial of 100 is 9.33262e+157
[Bearbeiten] Siehe auch
(C++11) |
natürlichen Logarithmus der Gamma-Funktion Original: natural logarithm of the gamma function The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
[Bearbeiten] Externer Links
Weisstein, Eric W. "Gamma Function." Von MathWorld - A Wolfram Web Resource .
Original:
Weisstein, Eric W. "Gamma Function." From MathWorld--A Wolfram Web Resource.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.