*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: remainder | Section: 3 | Source: Digital UNIX | File: remainder.3.gz
fmod(3) Library Functions Manual fmod(3) NAME fmod, drem, remainder - Compute the floating-point remainder LIBRARY Math Library (libm.a) SYNOPSIS #include <math.h> double fmod (double x, double y); float fmodf (float x, float y); double drem (double x, double y); float dremf (float x, float y); double remainder (double x, double y); float remainderf (float x, float y); STANDARDS Interfaces documented on this reference page conform to industry stan- dards as follows: fmod(): XPG4 remainder(): XPG4-UNIX Refer to the standards(5) reference page for more information about in- dustry standards and associated tags. DESCRIPTION The fmod() and fmodf() functions return the remainder r = x - n*y, where n = trunc(x/y). The result has the same sign as x and magnitude less than the magnitude of y. The remainder is computed exactly and |r| is less than or equal to |y|/2. The drem(), dremf(), remainder(), and remainderf() functions return the remainder r = x - n*y, where n = rint(x/y). Additionally, if |n - x/y|=1/2, then n is even. The remainder is computed exactly and |r| is less than or equal to |y|/2. The drem() and remainder() functions are aliases of each other. The dremf(), and remainderf() functions are aliases of each other. The following table describes function behavior in response to excep- tional arguments: tab(@); lfHB lfHB lfHB l l l. _ Function@Exceptional Argument@Routine Behavior _ fmod(), fmodf() @x = infinity @Invalid argument fmod(), fmodf() @y = 0 @Invalid argument drem(), dremf() @x = infinity @Invalid argument drem(), dremf() @y = 0 @Invalid argument remainder() @x = infinity @Invalid argument remainderf() @x = infinity @Invalid argument remainder() @y = 0 @Invalid argument remain- derf() @y = 0 @Invalid argument _ delim off fmod(3)

Navigation Options