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

Add f{32,64}::is_subnormal #76941

Merged
merged 1 commit into from
Nov 23, 2020
Merged

Add f{32,64}::is_subnormal #76941

merged 1 commit into from
Nov 23, 2020

Conversation

clarfonthey
Copy link
Contributor

@clarfonthey clarfonthey commented Sep 19, 2020

The docs recommend that you use dedicated methods instead of calling classify directly, although there isn't actually a way of checking if a number is subnormal without calling classify. There are dedicated methods for all other forms, excluding is_zero (which is just == 0.0 anyway).

@rust-highfive
Copy link
Collaborator

r? @withoutboats

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 19, 2020
@clarfonthey clarfonthey force-pushed the is_subnormal branch 4 times, most recently from 7d875f2 to 427b906 Compare September 25, 2020 02:28
@camelid camelid added A-floating-point Area: Floating point numbers and arithmetic T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Oct 30, 2020
Copy link
Member

@m-ou-se m-ou-se left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Can you open a tracking issue for the is_subnormal feature, and add its number in the unstable attributes in this PR?

library/core/src/num/f64.rs Outdated Show resolved Hide resolved
@m-ou-se m-ou-se assigned m-ou-se and withoutboats and unassigned withoutboats Oct 30, 2020
@m-ou-se m-ou-se added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 11, 2020
@clarfonthey
Copy link
Contributor Author

Somehow didn't notice that this had feedback! Was about to bug the thread again and see what was holding this up.

Will make those changes right now. :)

@clarfonthey
Copy link
Contributor Author

Rebased, filed tracking issue, and made the suggested change. Was waiting on a confirmation that this would be good to implement before I filed a tracking issue, since I didn't want to file something for a not-yet-approved change.

Let me know if you need anything else before merging. :)

@m-ou-se
Copy link
Member

m-ou-se commented Nov 22, 2020

Was waiting on a confirmation that this would be good to implement before I filed a tracking issue, since I didn't want to file something for a not-yet-approved change.

Yeah that's good. :)

Rebased, filed tracking issue, and made the suggested change.

I don't see the changes in this PR though. Did you push the right commit?

@clarfonthey
Copy link
Contributor Author

I in fact, did not commit the changes I made. -______-

Pushed.

@m-ou-se
Copy link
Member

m-ou-se commented Nov 22, 2020

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Nov 22, 2020

📌 Commit cf26f2f has been approved by m-ou-se

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 22, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#76941 (Add f{32,64}::is_subnormal)
 - rust-lang#77697 (Split each iterator adapter and source into individual modules)
 - rust-lang#78305 (Stabilize alloc::Layout const functions)
 - rust-lang#78608 (Stabilize refcell_take)
 - rust-lang#78793 (Clean up `StructuralEq` docs)
 - rust-lang#79267 (BTreeMap: address namespace conflicts)
 - rust-lang#79293 (Add test for eval order for a+=b)
 - rust-lang#79295 (BTreeMap: fix minor testing mistakes in rust-lang#78903)
 - rust-lang#79297 (BTreeMap: swap the names of NodeRef::new and Root::new_leaf)
 - rust-lang#79299 (Stabilise `then`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9b98f1d into rust-lang:master Nov 23, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 23, 2020
@clarfonthey clarfonthey deleted the is_subnormal branch November 23, 2020 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-floating-point Area: Floating point numbers and arithmetic S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants