## Math-Linux.com

Knowledge base dedicated to Linux and applied mathematics.

Home > Latex > FAQ > Latex - FAQ > Latex floor function

# Latex floor function

The floor function (or lower integer function) is a mathematical function that associates with any real number $x$ the largest integer $n$ such that $n \leq x$, and is often noted as $\lfloor x \rfloor$ or $\operatorname{floor}(x)$. In other words, the floor of $x$ is the largest integer less than or equal to $x$.
What is the Latex code for floor function ?
What is the Latex symbol for floor function ?

## LaTeX Code

The floor function can be easily implemented in LaTeX using the following command:


$\lfloor x \rfloor$


$\lfloor x \rfloor$

## Floor Function

The floor function is formally defined as follows:


$$\lfloor x \rfloor = \operatorname{max}\{n \in \mathbb{Z} : n \leq x\}$$


$$\lfloor x \rfloor = \operatorname{max}\{n \in \mathbb{Z} : n \leq x\}$$

## Example of Usage

Suppose we want to round the number $x = 4.7$ down to the nearest integer. We can use the floor function $\lfloor x \rfloor$, which returns the largest integer less than or equal to $x$. In this case, we have:


$$\lfloor 4.7 \rfloor = 4$$


$$\lfloor 4.7 \rfloor = 4$$