How to determine the set of real numbers corresponding to a given floating point number? Let's say we consider IEEE 754 double precision floating-point numbers, and we use RNTE - Round To Nearest, Ties to Even - rounding.
I know that the RNTE rounding works this way:
given two consecutive floating-point numbers, a and b, and a real number x,

if a &lt;= x &lt; (a+b)/2, x gets translated to a
if (a+b)/2 &lt; x &lt;= b, x gets translated to b
if x = (a+b)/2, x gets translated to the number with an even significand between a and b

For example, I want to know which are the real numbers that are &quot;mapped&quot; to 1, where 1 is a floating-point number. How should I proceed? I thought that I must consider both the cases where 1 is a and where 1 is b in the above definition, and so consider both the previous and the next floating-point number. Is it correct? Is there a simpler way?
The powers of two are more interesting than most other numbers.
Assume you are using double precision IEEE 754 format floating point numbers. Let $u = 2^{-52}$, Then the next floating point number larger than 1 is $1+u$, and the next floating point number smaller than 1 is $1 - u/2$.
A real number x is rounded to 1 if $1-u/4 ≤ x ≤ 1+u/2$. For any floating-point number f with $1 &lt; f &lt; 2$, x is rounded to f if $f - u/2 ≤ x ≤ f + u/2$ if the last bit of f is even, and if $f - u/2 &lt; x &lt; f + u/2$ if the last bit of f is odd.
Numbers x with $f - u/2 &lt; x &lt; f + u/2$ are always rounded to f, because f is the nearest floating point number. For the numbers $x = f ± u/2$, $f$ and $f ± u$ are equally far away, so the round-to-even rule decides.