Namespaces
Variants
Views
Actions

std::ceil

From cppreference.com
< cpp‎ | numeric‎ | math
Revision as of 17:38, 2 August 2011 by P12bot (Talk | contribs)

Template:cpp/numeric/math/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <cmath>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td class="t-dcl-nopad">
float       ceil( float arg );
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">

<td class="t-dcl-nopad">
double      ceil( double arg );
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">

<td class="t-dcl-nopad">
long double ceil( long double arg );
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Computes nearest integer not less than arg.

Parameters

arg - floating point value

Return value

nearest integer not less than arg

Template:notes

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

Template:example cpp

Template:see also

Template:cpp/numeric/math/dcl list floorTemplate:cpp/numeric/math/dcl list truncTemplate:cpp/numeric/math/dcl list round