Guardian C Library Calls Reference Manual
floor
3-46 128833—Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
floor
The floor function computes the largest integer not greater than its argument.
expr
is an expression of type double.
Return Value
is the largest integer not greater than expr, expressed as a double value.
Example
This example prints “The floor value of 1.090000 is 1.000000.”:
#include <mathh>
#include <stdioh>
int main(void)
{
double x, r;
x = 1.09;
r = floor(x);
printf("The floor value of %f is %f.", x, r);
}
#include <mathh>
double floor(double expr);