I am reading a numerical analysis book which talks about nearest numbers.
They quickly state that you can easily find nearest machine numbers, but never go on to show how exactly to do so.
Can someone please explain how you can find the two closest numbers $y'$ and $y''$ of a given number $y$, where $y'$ is the number below and $y''$ is the number above for double precision?
That is, to be precise, for $\mathbb{D}$ the set of floating point (double) values, $y' = \max\{x \in \mathbb{D} | x \leq y \} $ and $y'' = \min \{ x \in \mathbb{D} | x > y \}$.
Let say the number is $y = 0.8$.
How do you number the closest number above and below that number in double precision?