This document includes math equations (highlighted in red) which are best viewed with Firefox version 4.0 or higher, or another MathML-aware browser. There is also a PDF version of this document.
libdevice User's Guide (PDF) - CUDA Toolkit v5.5 for POWER8 (older) - Last updated October 15, 2014 - Send Feedback

3.155. __nv_fmodf

Prototype:

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

Description:

Calculate the floating-point remainder of x / y. The absolute value of the computed value is always less than y's absolute value and will have the same sign as x.

Returns:

  • Returns the floating point remainder of x / y.

  • __nv_fmodf( ± 0 , y) returns ± 0 if y is not zero.

  • __nv_fmodf(x, y) returns NaN and raised an invalid floating point exception if x is ± or y is zero.

  • __nv_fmodf(x, y) returns zero if y is zero or the result would overflow.

  • __nv_fmodf(x, ± ) returns x if x is finite.

  • __nv_fmodf(x, 0) returns NaN.

Note:

For accuracy information for this function see the CUDA C Programming Guide, Appendix C, Table C-2.

Library Availability:

Compute 2.0: Yes

Compute 3.0: Yes

Compute 3.5: Yes


libdevice User's Guide (PDF) - CUDA Toolkit v5.5 for POWER8 (older) - Last updated October 15, 2014 - Send Feedback