Search:

REMAINDER(3) DragonFly Library Functions Manual REMAINDER(3)## NAME

remainder,remainderf,remainderl,remquo,remquof,remquol-- minimal residue functions## SYNOPSIS

#include<math.h>doubleremainder(doublex,doubley);floatremainderf(floatx,floaty);longdoubleremainderl(longdoublex,longdoubley);doubleremquo(doublex,doubley,int*quo);floatremquof(floatx,floaty,int*quo);longdoubleremquol(longdoublex,longdoubley,int*quo);## DESCRIPTION

remainder(),remainderf(),remainderl(),remquo(),remquof(), andremquol() return the remainderr:=x-n*ywherenis the integer near- est the exact value ofx/y; moreover if |n-x/y| = 1/2 thennis even. Consequently the remainder is computed exactly and |r| <= |y|/2. But attempting to take the remainder whenyis 0 orxis +-infinity is an invalid operation that produces aNaN. Theremquo(),remquof() andremquol() functions also store the lastkbits ofnin the location pointed to byquo, provided thatnexists. The number of bitskis platform-specific, but is guaranteed to be at least 3.## SEE ALSO

fmod(3), nextafter(3)## STANDARDS

Theremainder(),remainderf(),remainderl(),remquo(),remquof(), andremquol() routines conform to ISO/IEC 9899:1999 (``ISO C99''). The remainder is as defined in IEEE Std 754-1985.drem() anddremf() are deprecated aliases forremainder() andremainderf(), respectively.## HISTORY

Theremainder() andremainderf() functions appeared in 4.3BSD and NetBSD 1.2, respectively. Theremquo() andremquof() functions were added in OpenBSD 4.4. DragonFly 5.3 July 7, 2011 DragonFly 5.3

Search: