You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Huge source of bugs and confusion gone, and things like hashmaps or btrees composed of floats work just fine.
But:
Inconsistent with virtually every other language
Have to use somewhat slower hardware operations or compile things in somewhat slower way
May affect ability to SIMD-parallelize operations like [float] < [float]? Not sure
The last two points seem important.
There is one final unknown:
Does anybody want the IEEE behavior? I imagine that it was defined this way for a reason, that if you're doing dense numerical computation, it is useful to have NaN <= NaN (etc) be false, but I've only heard one person "stick up" for it to me in conversation, and quite frankly their argument was unconvincing. It seems to me that you very well might want NaN <= NaN to be false, but you equally well might want the opposite, it will very much depend on what you are doing with the result of that comparison. And if you have to think about NaN anyway than I suspect you could as well account for total ordering.
In #115 @nikomatsakis suggested dada might use a total ordering for floats.
The standard behavior of nans is a big source of frustration without much benefit. It would be convenient to get rid of it.
I myself don't understand the implications of defining floats to have a total ordering.
The text was updated successfully, but these errors were encountered: