3.149. __nv_floorf

float @__nv_floorf(float %f)

Calculate the largest integer less than or equal to x.

Calculates the largest integer value which is less than or equal to x.

Note

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

Returns

Returns the largest integer value which is less than or equal to x expressed as a floating-point number.

  • __nv_floorf( \(\pm \infty\) ) returns \(\pm \infty\).

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