2.1.16.5.2 floor


Description

Calculates the double value corresponding to the largest integer that is less than or equal to x.

Syntax

double floor( double x )

Parameters

x
[input] independent variable

Return

floor(x)

Examples

EX1

void    floor_ex1()
{
    double    x1 = -4.6, x2 = 4.6;
    
    printf("floor(%f) = %f\nfloor(%f) = %f\n", x1, floor(x1), x2, floor(x2));
}

Remark

See Also

ceil

Header to Include

origin.h

Reference