Command:

FMOD(3) Linux Programmer's Manual FMOD(3)NAMEfmod, fmodf, fmodl - floating-point remainder functionSYNOPSIS#include<math.h>doublefmod(doublex,doubley);floatfmodf(floatx,floaty);longdoublefmodl(longdoublex,longdoubley);Link with-lm. Feature Test Macro Requirements for glibc (see feature_test_macros(7)):fmodf(),fmodl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE; orcc-std=c99DESCRIPTIONThefmod() function computes the floating-point remainder of dividingxbyy. The return value isx-n*y, wherenis the quotient ofx/y, rounded towards zero to an integer.RETURNVALUEOn success, these functions return the valuex-n*y, for some integern, such that the returned value has the same sign asxand a magnitude less than the magnitude ofy. Ifxoryis a NaN, a NaN is returned. Ifxis an infinity, a domain error occurs, and a NaN is returned. Ifyis zero, a domain error occurs, and a NaN is returned. Ifxis +0 (-0), andyis not zero, +0 (-0) is returned.ERRORSSee math_error(7) for information on how to determine whether an error has occurred when calling these func- tions. The following errors can occur: Domain error:xis an infinity An invalid floating-point exception (FE_INVALID) is raised. These functions do not seterrnofor this case. Domain error:yis zeroerrnois set toEDOM. An invalid floating-point exception (FE_INVALID) is raised.CONFORMINGTOC99, POSIX.1-2001. The variant returningdoublealso conforms to SVr4, 4.3BSD, C89.SEEALSOremainder(3)COLOPHONThis page is part of release 3.22 of the Linuxman-pagesproject. A description of the project, and informa- tion about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2008-08-05 FMOD(3)