MarkLogic 9 Product Documentation
fn.ceiling

fn.ceiling(
   arg as Number?
) as Number?

Summary

Returns the smallest (closest to negative infinity) number with no fractional part that is not less than the value of $arg. If type of $arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of $arg. If the type of $arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.

For xs:float and xs:double arguments, if the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned. If the argument is less than zero and greater than -1, negative zero is returned.

For detailed type semantics, see Section 7.2.3 The fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions[FS].

Parameters
arg A numeric value.

Example

fn.ceiling(10.5) 
=> 11

fn.ceiling(-10.5) 
=> -10
Powered by MarkLogic Server | Terms of Use | Privacy Policy