floor(3M) floor(3M)
NAME
floor, ceil, fmod, fabs, remainder - floor, ceiling, abso-
lute value, remainder functions
SYNOPSIS
#include <math.h>
double floor (x)
double x;
double ceil (x)
double x;
double fmod (x, y)
double x, y;
double fabs (x)
double x;
double remainder (x, y)
double x, y;
DESCRIPTION
floor returns the largest integer (as a double-precision
number) not greater than x.
Ceil returns the smallest integer not less than x.
Fmod returns the floating-point remainder of the division of
x by y: x if y is zero or if x/y would overflow; otherwise
the number f with the same sign as x, such that x = iy + f
for some integer i, and |f| < |y|.
Fabs returns the absolute value of x, |x|.
Remainder returns the floating point remainder of the divi-
sion of x by y. More precisely, it returns the value r = x
- yn, where n is the integer nearest the exact value x/y.
Whenever |n - x/y| = 1/2, then n is even.
DIAGNOSTICS
Fmod returns x when y is zero or if x/y would overflow and
sets errno to EDOM.
Remainder returns QNaN when y is 0 and sets errno to EDOM.
This error-handling procedures may be changed with the func-
tion matherr(3M).
SEE ALSO
abs(3C).
Page 1 CX/UX Programmer's Reference Manual