nearest integer function

function which returns the nearest integer to x; for half-integers, a rounding rule must be chosen, usually to round half-integers to the nearest even integer
Thing Idempotent Function Q6583251
nearest integer function
Eviatar Bach · Public Domain · Wikimedia

Facts

5 properties
Defining formula
x \mapsto \begin{cases} \lfloor x\rfloor & (x-\lfloor x\rfloor < 1/2) \\ \lfloor x \rfloor +1 & (x-\lfloor x\rfloor > 1/2) \\ \lfloor x\rfloor & (x-\lfloor x\rfloor = 1/2,\;\lfloor x\rfloor \equiv 0 \pmod 2) \\\lfloor x\rfloor + 1 & (x-\lfloor x\rfloor = 1/2,\;\lfloor x\rfloor \equiv 1 \pmod 2) \end{cases}
Definition domain
set of real numbers
Image of function
set of integers
🏷️ Also known as
en nearest integer function en rounding to integer en round to integer de Rundungsfunktion he עיגול לשלמים he פונקציית עיגול למספר שלם ja 最近接整数関数 nl Nint pl funkcja zaokrąglenia ru округление до ближайшего целого th ฟังก์ชันจำนวนเต็มใกล้สุด zh 奇進偶捨
🔖 Identifiers · 2
Google Knowledge Graph ID
/g/124xvxhnc

Report an error or request removal Lineage (PROV-JSON)

Press Enter · cited answer in seconds

Summary

nearest integer function is an idempotent function[1].

Key Facts

  • Instance of: integer-valued function[2], rounding[3]
  • Definition domain: set of real numbers[4]
  • Different from: floor and ceiling functions[5]
  • Image of function: set of integers[6]
  • nearest integer function's defining formula is recorded as x \mapsto \begin{cases} \lfloor x\rfloor & (x-\lfloor x\rfloor < 1/2) \ \lfloor x \rfloor +1 & (x-\lfloor x\rfloor > 1/2) \ \lfloor x\rfloor & (x-\lfloor x\rfloor = 1/2,\;\lfloor x\rfloor \equiv 0 \pmod 2) \\lfloor x\rfloor + 1 & (x-\lfloor x\rfloor = 1/2,\;\lfloor x\rfloor \equiv 1 \pmod 2) \end{cases}<sup id="cite-C8" class="cite-ref" title="nearest integer function — defining formula (P2534): x \mapsto \begin{cases} \lfloor x\rfloor & (x-\lfloor x\rfloor < 1/2) \ \lfloor x \rfloor +1 & (x-\lfloor x\rfloor > 1/2) \ \lfloor x\rfloor & (x">[?].
  • Maintained by WikiProject: WikiProject Mathematics[7]

📑 Cite this page

Use these citations when quoting this entity in research, articles, AI prompts, or wherever provenance matters. We aggregate Wikidata + Wikipedia + authoritative open-data sources; the stitched, scored, cross-referenced view is what 4ort.xyz contributes.

APA 4ort.xyz Knowledge Graph. (2026). nearest integer function. Retrieved November 27, 2026, from https://4ort.xyz/entity/nearest-integer-function
MLA “nearest integer function.” 4ort.xyz Knowledge Graph, 4ort.xyz, 27 Nov. 2026, https://4ort.xyz/entity/nearest-integer-function.
BibTeX @misc{4ortxyz_nearest-integer-function_2026, author = {{4ort.xyz Knowledge Graph}}, title = {{nearest integer function}}, year = {2026}, url = {https://4ort.xyz/entity/nearest-integer-function}, note = {Accessed: 2026-11-27}}
LLM prompt According to 4ort.xyz Knowledge Graph (aggregator of Wikidata, Wikipedia, and authoritative open-data sources): nearest integer function — https://4ort.xyz/entity/nearest-integer-function (retrieved 2026-11-27)

Canonical URL: https://4ort.xyz/entity/nearest-integer-function · Last refreshed: