Skip to content

floating point cleanups #12700

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

Merged
merged 2 commits into from
Mar 5, 2014
Merged

floating point cleanups #12700

merged 2 commits into from
Mar 5, 2014

Conversation

thestinger
Copy link
Contributor

No description provided.

The `std::cmp` functions are not correct for floating point types.

`min(NaN, 2.0)` and `min(2.0, NaN)` return different values, because
these functions assume a total order. Floating point types need special
`min`, `max` and `clamp` functions.
bors added a commit that referenced this pull request Mar 5, 2014
@bors bors closed this Mar 5, 2014
@bors bors merged commit 28d4f80 into rust-lang:master Mar 5, 2014
@thestinger thestinger deleted the float branch March 5, 2014 23:19
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 13, 2024
…archo

[`overly_complex_bool_expr`]: Fix trigger wrongly on never type

fixes rust-lang#12689

---

changelog: fix [`overly_complex_bool_expr`] triggers wrongly on never type
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

Successfully merging this pull request may close these issues.

2 participants