3.32. __nv_cospif

float @__nv_cospif(float %x)

Calculate the cosine of the input argument \(\times \pi\).

Calculate the cosine of x \(\times \pi\) (measured in radians), where x is the input argument.

Note

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

Returns

  • __nv_cospif( \(\pm 0\) ) returns 1.

  • __nv_cospif( \(\pm \infty\) ) returns NaN.