3.103. __nv_fabsf

float @__nv_fabsf(float %f)

Calculate the absolute value of the input argument.

Calculate the absolute value 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

Returns the absolute value of the input argument.

  • __nv_fabsf( \(\pm \infty\) ) returns \(+\infty\).

  • __nv_fabsf( \(\pm 0\) ) returns 0.