Floor function (source code)

= Floor function
{title2=$\lfloor x\rfloor$}

= Floor operation
{synonym}

= Floor
{synonym}

The floor $\lfloor x\rfloor$ is the greatest <integer> not exceeding the <real number> $x$. Equivalently, $\lfloor x\rfloor=m$ exactly when $m\leq x<m+1$, for an <integer> $m$. The <floor function> is constant on each such half-open <interval> and has a <discontinuity of a function> at each <integer>.

For nonnegative <integers> $N$ and positive <integers> $k$, $\lfloor N/k\rfloor$ is the number of complete groups of size $k$ that fit into $N$ items. With $N=102$ and $k=20$, five complete groups use 100 items. <Euclidean division> writes $102=20\cdot5+2$, retaining the two-item <remainder> rather than treating the <quotient> $102/20=5.1$ as a number of complete groups.