Definition:Nearest Integer Function

Definition
The nearest integer function is defined as:
 * $\forall x \in \R: \operatorname{nint} \left({x}\right) = \begin{cases}

\left\lfloor{x + \dfrac 1 2}\right\rfloor & : x \notin 2 \Z + \dfrac 1 2 \\ x - \dfrac 1 2 & : x \in 2 \Z + \dfrac 1 2 \end{cases}$ where $\left\lfloor{x}\right\rfloor$ is the floor function.

Also denoted as
The nearest integer function can also be denoted $\left\lfloor{\cdot}\right\rceil$ or $\left[{\cdot}\right]$.

Because $\left[{\cdot}\right]$ has, in earlier times, been used to denote the floor function, its use may lead to confusion.

Also see

 * Definition:Floor Function
 * Definition:Ceiling Function
 * Definition:Fractional Part
 * Definition:Distance to Nearest Integer Function