3.232. __nv_log

double @__nv_log(double %x)

Calculate the base \(e\) logarithm of the input argument.

Calculate the base \(e\) logarithm of the input argument x.

Note

For accuracy information, see the CUDA C++ Programming Guide, Mathematical Functions Appendix, Double-Precision Floating-Point Functions section.

Returns

  • __nv_log( \(\pm 0\) ) returns \(-\infty\).

  • __nv_log(1) returns +0.

  • __nv_log(x) returns NaN for x < 0.

  • __nv_log( \(+\infty\) ) returns \(+\infty\)