DragonFly On-Line Manual Pages
REMAINDER(3) DragonFly Library Functions Manual REMAINDER(3)
remainder, remainderf, remainderl, remquo, remquof, remquol -- minimal
remainder(double x, double y);
remainderf(float x, float y);
remainderl(long double x, long double y);
remquo(double x, double y, int *quo);
remquof(float x, float y, int *quo);
remquol(long double x, long double y, int *quo);
remainder(), remainderf(), remainderl(), remquo(), remquof(), and
remquol() return the remainder r := x - n*y where n is the integer near-
est the exact value of x/y; moreover if |n - x/y| = 1/2 then n is even.
Consequently the remainder is computed exactly and |r| <= |y|/2. But
attempting to take the remainder when y is 0 or x is +-infinity 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
The remainder(), remainderf(), remainderl(), remquo(), remquof(), and
remquol() routines conform to ISO/IEC 9899:1999 (``ISO C99''). The
remainder is as defined in IEEE Std 754-1985.
drem() and dremf() are deprecated aliases for remainder() and
The remainder() and remainderf() functions appeared in 4.3BSD and
NetBSD 1.2, respectively. The remquo() and remquof() functions were
added in OpenBSD 4.4.
DragonFly 4.9 July 7, 2011 DragonFly 4.9