CEILZ Function

Returns the smallest integer that is greater than or equal to the argument, using zero fuzzing.

Category: Truncation
Returned data type: DOUBLE

Syntax

CEILZ(expression)

Arguments

expression

specifies any valid expression that evaluates to a numeric value.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions.

Comparisons

Unlike the CEIL function, the CEILZ function uses zero fuzzing. If the argument is within 1E-12 of an integer, the CEIL function fuzzes the result to be equal to that integer. The CEILZ function does not fuzz the result. Therefore, with the CEILZ function, you might get unexpected results.

Example

The following statements illustrate the CEILZ function:
Statements
Results
select ceilz(2.1);
3
select ceilz(3);
3
select ceilz(1+1.e-11);
2
select ceilz(223.456);
224
select ceilz(-223.456);
-223