cc [ flag ... ] file ... -lm [ library ... ] #include <math.h>double floor(double x);
Upon successful completion, floor() returns the largest integral value not greater than x, expressed as a double.
If x is NaN, NaN is returned.
If x is ±Inf or ±0, x is returned.
No errors will occur.
The integral value returned by floor() as a double might not be expressible as an int or long int. The return value should be tested before assigning it to an integer type to avoid the undefined results of an integer overflow.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|