Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

floating point types have an incorrect implementation of Eq and Ord #12434

Closed
thestinger opened this issue Feb 21, 2014 · 1 comment
Closed

Comments

@thestinger
Copy link
Contributor

There are two solutions available:

  • implement the total ordering for Eq and Ord, and offer the traditional comparison operators via intrinsics and the Float trait
  • drop the implementations of Eq, Ord and traits inheriting from these like Num (alternate types could implement the total ordering)

Either way, it's an ugly mess. I no longer think a consensus can be reached to change the definition of the operators to using the totalOrder predicate due to both performance concerns and the desire to have the usual semantics so that's not part of the RFC.

@thestinger
Copy link
Contributor Author

The pull request isn't going to land, so this can be closed as it was opened pre-emptively in order to refer to the issue in a FIXME.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant