Synopsis
double fmod(double x,
            double y);
Description

fmod computes the floating-point remainder of x divided by y. #b #this returns the value x ? n y, for some integer n such that, if y is nonzero, the result has the same sign as x and magnitude less than the magnitude of y.

If y = 0, fmod returns zero and errno is set to EDOM.

fmod (± 0, y) is ± 0 for y not zero.
fmod (∞, y) is NaN.
fmod (x, 0) is NaN.
fmod (x, ± ∞) is x for x not infinite.