floor#
Synopsis#
#include <math.h>
double floor(double x);
float floorf(float x);
long double floorl(long double x);
Status#
Partially implemented
Conformance#
IEEE Std 1003.1-2017
Description#
These functions shall compute the largest integral value not greater than x.
Return value#
The result shall have the same sign as x.
Upon successful completion, these functions shall return the largest integral value not greater than x, expressed as a double, float, or long double, as appropriate for the return type of the function.
If x is
NaN
, aNaN
shall be returned.If x is
±0
or±Inf
, x shall be returned.
Errors#
No errors are defined.
Tests#
Untested
Known bugs#
None