3.168. __nv_fmod
-
double @__nv_fmod(double %x, double %y)
Calculate the double-precision floating-point remainder of
x/y.Calculate the double-precision floating-point remainder of
x/y. The floating-point remainder of the division operationx/ycalculated by this function is exactly the valuex - n*y, wherenisx/ywith its fractional part truncated. The computed value will have the same sign asx, and its magnitude will be less than the magnitude ofy.Note
For accuracy information, see the CUDA C++ Programming Guide, Mathematical Functions Appendix, Double-Precision Floating-Point Functions section.
- Returns
Returns the floating-point remainder of
x/y.__nv_fmod( \(\pm 0\) ,
y) returns \(\pm 0\) ifyis not zero.__nv_fmod(
x, \(\pm\infty\) ) returnsxifxis finite.__nv_fmod(
x,y) returns NaN ifxis \(\pm \infty\) oryis zero.If either argument is NaN, NaN is returned.