3.241. __nv_logf

float @__nv_logf(float %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, Single-Precision Floating-Point Functions section.

Returns

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

  • __nv_logf(1) returns +0.

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

  • __nv_logf( \(+\infty\) ) returns \(+\infty\)