fn:ceiling

Return smallest integer not smaller than its argument.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

fn:ceiling(double? $number) => double?

Description

This function returns the smallest integer that is not smaller than the value of $number. If the argument is the empty sequence, it returns the empty sequence. If the argument is a literal, then the literal must be a valid lexical form of its type.

Argument

$number

double-precision number

Examples

  • Call function with the numeric value 41.7:

    ceiling(41.7E0)
    ceiling(xs:double("41.7"))

    In both cases the double-precision number 4.2E1 is returned. In the first query the argument is a valid literal of the required type, in the second query the required type is constructed using the constructor function xs:double.

  • Call function with the numeric value -273.15:

    ceiling(-273.15E0)

    This query returns -2.73E2.