Math functions

ceiling: Returns the smallest integer that is not less than $arg. The result type depends
on the numeric type of the argument. If $arg is untyped, it is cast to xs:double.
Full description: http://www.w3.org/TR/xpathfunctions/#funcceiling

floor: Returns the largest integer not greater than $arg. The result type depends on the
numeric type of the argument. If $arg is untyped, it is cast to xs:double.
Full description: http://www.w3.org/TR/xpathfunctions/#funcfloor

round: Rounds a numeric value to the nearest integer. If the decimal portion of the number
is .5 or greater, it is rounded up to the greater whole number (even if it is negative);
otherwise, it is rounded down. The result type depends the numeric type of the
Full description: http://www.w3.org/TR/xpathfunctions/#funcroundargument. If $arg is untyped, it is cast to xs:double.

sum: Sums the values in a sequence. The $arg sequence can contain a mixture of numeric
and untyped values. Numeric values are promoted, as necessary, to make them all the
same type. Untyped values are cast as numeric xs:double values. The function can also
be used on duration values; the $arg sequence can contain all xs:yearMonthDuration
values or all xs:dayTimeDuration values (not a mixture of the two). The $zero argument
allows you to specify an alternate value for the sum of the empty sequence. If $arg
is the empty sequence, and $zero is provided, the function return $zero. The $zero
argument could be the empty sequence. The integer 0, the value NaN, a duration of
zero seconds, or any other atomic value.
Full description: http://www.w3.org/TR/xpathfunctions/#funcsum