Sort radix works with the binary representation of a number and sorts objects as if they were a large binary integer.
For real integers and strings, the binary representation agrees well with the ordering that we usually expect, and therefore radix sorting is an interesting, if somewhat unusual, alternative.
It turns out that as long as the floating-point number intersects in the right direction, the numbering sorting may work well, except that it will process the sign bit back.
In the internal binary representation, the FP values ββhave a signed bit, about 10 bits of the exponent, and then about 20 or 50 bits are a βfractionβ or mantissa.
SEEEEEEEEMMMMMMMMMMMM MMM . . .
The indicator is biased so that small values ββare indeed the most negative indicators, so it is sorted correctly, like the mantissa.
As long as all numbers are either positive or negative, or if the sign bit is first inverted and scanning from left to right, I think that radix sorting will work with FP numbers.
source share