Definition:Distance to Nearest Integer Function/Definition 2

Definition
The nearest integer function $\left\Vert{\cdot}\right\Vert : \R \to \left[{0 \,.\,.\, \dfrac 1 2}\right]$ is defined as:
 * $\left\Vert{\alpha}\right\Vert := \min \left\{{ \left\{{\alpha}\right\}, 1 - \left\{{\alpha}\right\} }\right\}$

where $\left\{{\alpha}\right\}$ is the fractional part of $\alpha$.