std::tgamma
Da 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. |
Definido no cabeçalho <cmath> | ||
float tgamma(float arg ); | (desde C++11) | |
double tgamma(double arg ); | (desde C++11) | |
longdouble tgamma(longdouble arg ); | (desde C++11) | |
double tgamma( Integral arg ); | (desde C++11) | |
Calcula a gama de funções de
arg
.Original:
Computes the gama de funções 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.
Índice |
[editar]Parâmetros
arg | - | flutuando valor de ponto 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. |
[editar]Valor de retorno
O valor da função gama de
0targ-1
e-t dt.
arg
, isto é ∫∞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.
Se
arg
é um número natural, std::tgamma(arg) é o fatorial de 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.
[editar]Exceções
Se
arg
é negativo, o erro de domínio pode ocorrer e pode ser elevado FE_INVALID.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.
Se
arg
é zero, o erro pode ocorrer pólo e FE_DIVBYZERO pode ser levantada.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.
Se
arg
for demasiado grande, intervalo de erro pode ocorrer e pode ser elevado FE_OVERFLOW.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.
Se
arg
é muito pequeno, intervalo de erro pode ocorrer e pode ser elevado FE_UNDERFLOW.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.
[editar]Notas
Muitas implementações calcular o exato número inteiro domínio fatorial se o argumento é um inteiro suficientemente pequeno.
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.
[editar]Exemplo
#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';}
Saída:
The factorial of 5 is 120 The factorial of 100 is 9.33262e+157
[editar]Veja também
(C++11) | logaritmo natural da função gama 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. (função) |
[editar]Links externos
Weisstein, Eric W. "Gamma Function." De MathWorld - Um recurso Web Wolfram.
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.