3.102. __nv_fabs

double @__nv_fabs(double %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_fabs( \(\pm \infty\) ) returns \(+\infty\).

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