# Symbols:Number Theory/Nearest Integer

## Nearest Integer Function

$\nint x$

The nearest integer function is defined as:

$\forall x \in \R: \nint x = \begin {cases} \floor {x + \dfrac 1 2} & : x \notin 2 \Z + \dfrac 1 2 \\ x - \dfrac 1 2 & : x \in 2 \Z + \dfrac 1 2 \end{cases}$

where $\floor x$ is the floor function.

The $\LaTeX$ code for $\nint x$ is \nint x .