ceil

Computes the smallest integer not less than x.

Library:LibC
Classification:ANSI
Service:Math

Syntax

  #include <math.h> 
   
  double ceil (
     double   x);
  

Parameters

x

(IN) Specifies an argument.

Return Values

Returns the smallest integer not less than x, expressed as a double type.

Remarks

The ceil function (ceiling function) computes the smallest integer not less than x:

     (ceil (x) ::= -floor (-x))
  

See Also

floor