-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add f{32,64}::is_subnormal #76941
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
7d875f2
to
427b906
Compare
427b906
to
0ef2666
Compare
There was a problem hiding this 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?
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. :) |
0ef2666
to
b71f91a
Compare
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. :) |
Yeah that's good. :)
I don't see the changes in this PR though. Did you push the right commit? |
b71f91a
to
cf26f2f
Compare
I in fact, did not commit the changes I made. -______- Pushed. |
Thanks! @bors r+ |
📌 Commit cf26f2f has been approved by |
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
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, excludingis_zero
(which is just== 0.0
anyway).