3.316. __nv_tgamma
-
double @__nv_tgamma(double %x)
Calculate the gamma function of the input argument.
Calculate the gamma function of the input argument
x, namely the value of \(\int_{0}^{\infty} e^{-t}t^{x-1}dt\).Note
For accuracy information, see the CUDA C++ Programming Guide, Mathematical Functions Appendix, Double-Precision Floating-Point Functions section.
- Returns
__nv_tgamma( \(\pm 0\) ) returns \(\pm \infty\).
__nv_tgamma(2) returns +0.
__nv_tgamma(
x) returns \(\pm \infty\) if the correctly calculated value is outside the double floating point range.__nv_tgamma(
x) returns NaN ifx< 0.__nv_tgamma( \(-\infty\) ) returns NaN.
__nv_tgamma( \(+\infty\) ) returns \(+\infty\).