fmod [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Library Reference Manual
fmod
Returns the floating-point remainder of x divided by y.
Syntax
#include <math.h>
double fmod (double x, double y);
Parameters
x The numerator.
y The divisor.
Return Values
f The remainder of x/y.
NaN Neither x or y is a number, x is +INFINITY, or y is
zero. In addition, errno is set to EDOM.
x An underflow condition has occurred; y may be
+-infinity.
0 An overflow condition has occurred.
Description
The fmod function returns the floating-point remainder of the division of
x by y. Zero is returned if y is zero or if x/y overflows. Otherwise
the number f with the same sign as x is returned, such that x =iy + f for
some integer i and |f| < |y|.
See Also
floor(), ceil(), fabs(), ANSI C 4.5.6.4, POSIX.1 8.1
MPE/iX 5.0 Documentation