Definition:Nearest Integer Function
Jump to navigation
Jump to search
Definition
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.
![]() | This article, or a section of it, needs explaining. In particular: Definition of $2 \Z$ -- this may help to clarify You can help $\mathsf{Pr} \infty \mathsf{fWiki}$ by explaining it. To discuss this page in more detail, feel free to use the talk page. When this work has been completed, you may remove this instance of {{Explain}} from the code. |
Also denoted as
The nearest integer function can also be denoted $\sqbrk {\, \cdot \,}$ but because is also frequently seen for the floor function, its use may lead to confusion.
Some sources use the more explicit $\map {\mathrm {nint} } x$.
Also see
- Definition:Floor Function
- Definition:Ceiling Function
- Definition:Fractional Part
- Definition:Distance to Nearest Integer Function
Technical Note
The $\LaTeX$ code for \(\nint {x}\) is \nint {x}
.
When the argument is a single character, it is usual to omit the braces:
\nint x
Sources
- Weisstein, Eric W. "Nearest Integer Function." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/NearestIntegerFunction.html