map_floating_point_order

Macro map_floating_point_order 

Source
macro_rules! map_floating_point_order {
    ($value:expr, $ty:ty) => { ... };
}
Expand description

Ordering floating-point numbers according to their binary representations contradicts with their natural ordering. Floating-point number ordering after unsigned integer transmutation looks like:

0, 1, 2, 3, ..., MAX, -0, -1, -2, ..., -MAX

This macro applies a one-to-one map that fixes the ordering above.