notriddle / rust-float-ord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding Ord to non-builtin floats

Artoria2e5 opened this issue · comments

Since the magic works on anything laid out like an IEEE float, it might be a good idea to add some way to apply the macro to crate floats like these in half-rs (f16, bf16) and f128. I am not sure what the best way to do it is -- can we just export the whole macro?

That would be possible, yes.

I mean, the big downside of trying to do that is it'll make the crate a lot more complicated. Right now, FloatOrd isn't even a trait, but it would kinda have to be for this to work. It would also benefit from Safe Transmute, which doesn't exist yet.