3.121. __nv_fdimf

float @__nv_fdimf(float %x, float %y)

Compute the positive difference between x and y.

Compute the positive difference between x and y. The positive difference is x - y when x > y and +0 otherwise.

Note

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

Returns

Returns the positive difference between x and y.

  • __nv_fdimf(x, y) returns x - y if x > y.

  • __nv_fdimf(x, y) returns +0 if x \(\leq\) y.