# xf:ceiling

Rounds $double-var up to the next whole number.

If the value of $string-var is the empty sequence, the empty sequence is returned.The empty sequence is a sequence containing zero items (), which is similar to null in SQL.

### Signatures

xf:ceiling(xs:double? $double-var) —> xs:double?

### Arguments

Data Type | Argument | Description
--- | --- | ---
xs:double? | $double-var | Represents the double to round up.

### Returns

Returns a double equal to $double-var rounded up to the next whole number.

### Examples

This Query . . . | Generates This Result . . .
--- | ---
<r>{xf:ceiling(xs:double("11.9"))}</r> | <r>12.0</r>
<r>{xf:ceiling(xs:double("11.5"))}</r> | <r>12.0</r>
<r>{xf:ceiling(xs:double("11.1"))}</r> | <r>12.0</r>
<r>{xf:ceiling(xs:double("-11.9"))}</r> | <r>-11.0</r>
<r>{xf:ceiling(xs:double("-11.5"))}</r> | <r>-11.0</r>
<r>{xf:ceiling(xs:double("-11.1"))}</r> | <r>-11.0</r>

Related Topics

W3C ceiling function description.