Chapter Contents

Previous

Next
CEIL

CEIL



Returns the smallest integer that is greater than or equal to the argument

Category: Truncation


Syntax
Arguments
Details
Examples

Syntax

CEIL (argument)

Arguments

argument
is numeric.


Details

If the argument is within 10**(-12) of an integer, the function returns that integer.


Examples

The following SAS statements produce these results:

SAS Statements Results
var1=2.1;
a=ceil(var1);
put a=;

 

3
var2=3;
b=ceil(var2);
put b=;

 

3
c=ceil(-2.4);
put c=;

 
-2
d=ceil(1+1.e-11);
put d=;

 
2
e=ceil(-1+1.e-11);
put e=;

 
0
f=ceil(1+1.e-13);
put f=;

 
1


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.