Everything

floor / floorf / floorl


Returns the largest integral value not greater than or equal to the given floating-point number.

[Format]

#include <math.h>

double floor (double d);

float floorf (float d);

long double floorl (long double d);

[Parameters]

d Floating-point number for which largest integral value not greater than that number is to be computed

[Return values]

Largest integral value not greater than or equal to d

[Remarks]

The floor function returns the largest integral value not greater than or equal to d, expressed as a double type value. Therefore, if d is negative, the value after rounding-up of the fractional part is returned.