3.31. __nv_cospi

double @__nv_cospi(double %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, Double-Precision Floating-Point Functions section.

Returns

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

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