Namespaces
Variants
Views
Actions

ceil

From cppreference.com
< c‎ | numeric‎ | math
Revision as of 21:38, 31 May 2013 by P12bot (Talk | contribs)

 
 
 
Common mathematical functions
Functions
Basic operations
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)(C99)(C99)
Exponential functions
(C99)
(C99)
(C99)
(C99)
Power functions
(C99)
(C99)
Trigonometric and hyperbolic functions
(C99)
(C99)
(C99)
Error and gamma functions
(C99)
(C99)
(C99)
(C99)
Nearest integer floating point operations
ceil
(C99)(C99)(C99)
(C99)
(C99)(C99)(C99)
Floating point manipulation functions
(C99)(C99)
(C99)
(C99)
Classification
(C99)
(C99)
(C99)
Macro constants
 
Defined in header <math.h>
float       ceilf( float arg );
(since C99)
double      ceil( double arg );
long double ceill( long double arg );
(since C99)

Computes nearest integer not less than arg.

Contents

Parameters

arg - floating point value

Return value

Nearest integer not less than arg

Notes

The integer value can be always represented by the given floating point type.

Example

See also

computes largest integer not greater than the given value
(function) [edit]
(C99)(C99)(C99)
rounds to nearest integer not greater in magnitude than the given value
(function) [edit]
(C99)(C99)(C99)
rounds to nearest integer, rounding away from zero in halfway cases
(function) [edit]