How to convert 32 bit integers to 32 bit floats so that the ordering is preserved?
<p>I have two 32 bit integers i1,i2 which I need to convert to floats f1,f2 in such a way that their relative ordering is preserved (i.e. i1 &lt; i2 => f1 &lt; f2)</p>

<p>Will a reinterpret_cast do the trick? Is there some better way?</p>
