floor(3M)
NAME
floor() − floor function
SYNOPSIS
#include <math.h>
double floor(double x);
DESCRIPTION
floor() returns the largest integer (represented as a double-precision number) not greater than x.
To use this function, link in the math library by specifying −lm on the compiler or linker command line.
RETURN VALUE
If x is ±INFINITY or ±zero, floor() returns x.
If x is NaN, floor() returns NaN.
If the correct value would overflow, floor() returns −HUGE_VAL and sets errno to [ERANGE].
ERRORS
If floor() fails, errno is set to the following value.
[ERANGE] The correct value would overflow.
SEE ALSO
ceil(3M), fmod(3M), fabs(3M), rint(3M), isinf(3M), isnan(3M).
STANDARDS CONFORMANCE
floor(): SVID3, XPG4.2, ANSI C
Hewlett-Packard Company — HP-UX Release 10.20: July 1996