The following describes my understanding of floating point representations.
(For numbers $b, m, E_{min}, E_{max} \in \mathbb{N} \setminus \{0\}$, $b>1$, $E_{min} \leq E_{max}$...)
Let $F(b, m, E_{min}, E_{max})$ be the set of all real numbers $x \in \mathbb{R}$ that can represented as
$x = \sigma \cdot (\sum_{i=0}^{m-1} s_i b^{-i}) \cdot b^E$
where $\sigma \in \{-1, 1\}$, $s_i \in \{0, ..., b-1\}$, $s_0 \neq 0$, $E \in \{E_{min}, ..., E_{max}\}$.
$F(b, m, E_{min}, E_{max})$ is then called a floating point range.
The mapping of an arbitrary real number $x \in \mathbb{R}$ to it's closest floating point representation $x' \in F(b, m, E_{min}, E_{max})$, where the floting point range is given, is called rounding.
Now my question is how I do the rounding for an arbitrary real number given an arbitrary floating point range (Where the base $b$ is not neccesarily $2$ or $10$). And once I have this, I want to know how I can convert floating point representations from one floating point range into another floating point range, for example with another base. There won't be always an exact representation, so I have to find the closest again. How do I do this?
Thank you in advance.