OAR

RTEMS GNU Tools On-Line Library


floor

PREV UP NEXT Bookshelf

1.14: floor, floorf, ceil, ceilf---floor and ceiling

Synopsis

#include <math.h>
double floor(double x);
float floorf(float x);
double ceil(double x);
float ceilf(float x);

Description
floor and floorf find the nearest integer less than or equal to x. ceil and ceilf find the nearest integer greater than or equal to x.


Returns
floor and ceil return the integer result as a double. floorf and ceilf return the integer result as a float.


Portability
floor and ceil are ANSI. floorf and ceilf are extensions.



PREV UP NEXT Bookshelf

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.