CEIL

CEIL determines the smallest integer value greater than or equal to x, and assigns this value to the result.

Read syntax diagramSkip visual syntax diagramCEIL( x)
x
Real expression.
The result has the mode, base, scale, and precision of x, except when x is fixed-point with precision (p,q). The precision of the result is then given by:
  (min(N,max(p-q+1,1)),0)
where N is the maximum number of digits allowed.
If the expression x has the form (y/z) where y is an unscaled FIXED BIN expression and z is an unscaled FIXED expression, then CEIL(x) will be evaluated by computing the integral quotient and then rounding it up by one if the following conditions are met:
  • The quotient is non negative.
  • The remainder of (y/z) is not zero.

If the expression x has the attributes FIXED BIN(p,q) but does not have the form above, then q must be positive.