Home

floorvalue

The floor value, commonly referred to as the floor function, assigns to a real number x the greatest integer that is less than or equal to x. It is denoted by floor(x) or ⌊x⌋. Formally, ⌊x⌋ is an integer satisfying ⌊x⌋ ≤ x < ⌊x⌋ + 1 for every real x. If x is already an integer, then ⌊x⌋ = x.

Examples include ⌊3.7⌋ = 3 and ⌊−2.5⌋ = −3. The fractional part of x is defined as {x} =

The floor function is related to the ceiling function, which gives the least integer greater than or

In floating-point arithmetic, precision issues can cause values very close to an integer to yield an incorrect

Applications include rounding down quantities, index calculations in arrays, lattice point problems, and various mathematical and

See also: ceiling function, truncation, rounding, floor division.

x
−
⌊x⌋,
with
0
≤
{x}
<
1.
equal
to
x,
as
⌈x⌉.
It
also
underpins
many
rounding-down
operations
in
algorithms
and
connects
to
floor
division
in
programming
languages,
where
the
result
of
a
÷
b
is
⌊a/b⌋
under
appropriate
numeric
types.
floor.
Such
edge
cases
are
typically
addressed
with
careful
numerical
handling
or
exact
arithmetic
when
necessary.
computational
procedures
that
require
integer-valued
outputs
derived
from
real
numbers.