What is the mathematical notation for rounding a given number to the nearest integer?

I have seen $\lfloor x \rceil$. It must have been in the context of math olympiads, so I can't point to a book that uses it. Wikipedia suggest this notation, among others: nearest integer function.

Personally, I would prefer $[x]$, being a cleaner mix of $\lfloor x \rfloor$ and $\lceil x \rceil$. But I've seen this notation being used for the floor function. Especially in older texts, say, pre-TeX era.

You could also do something like $\mathrm{nint}(x)$, but in formulas that could be cumbersome.

See also the remarks at Mathworld.


I have seen the notation $[x]$. However, that is some times used as the floor function when TeX is unavailable, or the author is unfamiliar with it (I'm sure there are plenty of examples on this site, for instance).

The safest bet is to say something along the lines of

Let $[x]$ mean the integer closest to $x$ (rounding up for half-integer values).

or

Let $[\phantom x]$ denote the standard rounding function.

That is, explicitly defining the notation yourself, so that anyone who reads your text knows exactly what you're talking about. If you do this, you are of course entirely free to "invent" your own notation (within reason) for this if there is some other notation you prefer.


Whatever notation you use (punctured dusk gives some good suggestions), you should always define this explicitly if you are going to use it, since there is no standard way to treat half-integers. (I recently found this out the hard way when I assumed the rounding method I was always taught was standard, but python's default does something different.)