3 ms·
> Don't denormal numbers prevent simply sorting this way? I could use a diagram like the OP's to remind myself how they work... No, there is nothing really spe
by thethirdone 9y ago
> Don't denormal numbers prevent simply sorting this way? I could use a diagram like the OP's to remind myself how they work...
No, there is nothing really special about subnormal numbers other than that they have a smaller than normal precision.
For example 0x00000001 < 0x00400000 in both floating point and normal integer arithmetic. The only weird bit about sorting floats as integers is that the order is reversed; eg -0f is represented by the smallest integer (0x80000000) and -Inf is represented by 0xFF800000.