remainder(),
remainderf(),
remainderl(),
remquo(),
remquof(),
and
remquol()
return the remainder
r
:=
x
-
n*y
where
n
is the integer nearest the exact value of
x,
Ns,
/,
Ns,
Fa,
y;
moreover if
|
n
-
x,
No,
/,
Fa,
y,
No,
|=
1/2
then
n
is even.
Consequently
the remainder is computed exactly and
|
r,
No,
|≤
|
y,
No,
|/2.But attempting to take the remainder when
y
is 0 or
x
is ±∞ is an invalid operation that produces a NaN.
The
remquo(),
remquof(),
and
remquol()
functions also store the last
k
bits of
n
in the location pointed to by
quo,
provided that
n
exists.
The number of bits
k
is platform-specific, but is guaranteed to be at least 3.