# Floor function

entier function, greatest integer function, integral part function

The function of a real variable that assigns to a real number $x$ the largest integer $\leq x$. The modern notation is $\lfloor x\rfloor$; the classical notation is $[x]$. In computer science and computer languages it is often denoted by $\operatorname{int}(x)$.

The related ceiling function $\lceil x\rceil$ gives the smallest integer $\geq x$. The fractional part function is defined as

$$\operatorname{frac}(x)=\begin{cases}x-\lfloor x\rfloor&\text{for }x\geq0,\\x-\lfloor x\rfloor-1&\text{for }x<0.\end{cases}$$

The nearest integer function is

$$\operatorname{nint}(x)=\operatorname{round}(x)=x-\operatorname{frac}(x).$$

How to Cite This Entry:
Floor function. Encyclopedia of Mathematics. URL: http://encyclopediaofmath.org/index.php?title=Floor_function&oldid=33154
This article was adapted from an original article by M. Hazewinkel (originator), which appeared in Encyclopedia of Mathematics - ISBN 1402006098. See original article