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.
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. http://mathworld.wolfram.com/NearestIntegerFunction.html