If
y
is non-zero, the
fmod,
fmodf,
and
fmodl
functions return the value
.Sm off
x - i * y,
.Sm on
for some integer
i,
such that the result has the same sign as
x
and magnitude less than the magnitude of
y.
If
y
is zero, a NaN is produced.