Return largest integer not greater than its argument.
The following construct(s) refer to this construct:
fn:floor(double? $number) => double?
This function returns the largest integer that is not greater 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.
$number |
double-precision number |
---|
Call function with the numeric value 42.7
:
floor(42.7E0)
floor(xs:float("42.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 achieved by constructing a value
of type xs:float
that
is promoted to xs:double
.
Call function with the numeric value -273.15
:
floor(-273.15E0)
This query returns -2.74E2
.