MarkLogic Server 11.0 Product Documentation
fn:floor

fn:floor(
   $arg as numeric?
) as numeric?

Summary

Returns the largest (closest to positive infinity) number with no fractional part that is not greater 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 float and double arguments, if the argument is positive zero, then positive zero is returned. If the argument is negative zero, then 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:floor(10.5) 
=> 10

fn:floor(-10.5) 
=> -11
Powered by MarkLogic Server | Terms of Use | Privacy Policy