-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Tracking issue for float_extras
stabilization
#27752
Comments
For a CBOR serializer crate I used the The unstable methods of
The unstable methods of
I wonder why The
I don't know what should happen with
|
@pyfisch Could you elaborate what you're using |
@rkruppe: I use them to decode half floats to f32: https://github.com/pyfisch/cbor/blob/master/src/de.rs#L173 |
Oh, so you're also using it in lieu of a proper API for disassembling and reassembling IEEE 754 floats. As I said before, I think |
Personally, I haven't written a single program, in which I wouldn't have needed the radian / degree conversion methods. Seeing the f32 versions being stabilized would be a bliss. |
@Lisoph D'oh! That seems to just be an oversight; the ones on |
@Lisoph That's fine -- if you'd like, you can also submit a PR to stabilize it. If not, I or someone else from the libs team will take care of it soon! |
+1 to any resolution to these. Don't care much at this point about the naming question or the exact functionality. Let's just decide. |
If the choice is between stabilizing or deprecating now, I would plead for deprecation. The current interface is sub-par, designing a good one is hard, this functionality is relatively niche and really doesn't need to be in std — it can easily be implemented with |
🔔 This issue is now entering its final comment period 🔔 The libs team was unfortunately a little late on stabilizations this cycle, but we're thinking of probably doing a backport of stabilizations partway through the beta cycle. We were somewhat ambivalent if I remember correctly on whether to stabilize or deprecate these functions. The functionality is likely needed by someone, but the names are unfortunately sub-par wrt the rest of the module. |
I think they should be deprecated since they are not used often enough. Maybe some will be reintroduced in the future with better names. |
The libs team discussed this issue during triage yesterday and the decision was to deprecate. We realize that the FCP for this issue was pretty short, however, so please comment with any objections you might have! We're very willing to backport an un-deprecate for the few APIs we have this cycle. |
Although the set of APIs being stabilized this release is relatively small, the trains keep going! Listed below are the APIs in the standard library which have either transitioned from unstable to stable or those from unstable to deprecated. Stable * `BTreeMap::{append, split_off}` * `BTreeSet::{append, split_off}` * `Cell::get_mut` * `RefCell::get_mut` * `BinaryHeap::append` * `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past libstd stabilizations * `Iterator::sum` * `Iterator::product` Deprecated * `{f32, f64}::next_after` * `{f32, f64}::integer_decode` * `{f32, f64}::ldexp` * `{f32, f64}::frexp` * `num::One` * `num::Zero` Added APIs (all unstable) * `iter::Sum` * `iter::Product` * `iter::Step` - a few methods were added to accomodate deprecation of One/Zero Removed APIs * `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is unstable Closes rust-lang#27739 Closes rust-lang#27752 Closes rust-lang#32526 Closes rust-lang#33444 Closes rust-lang#34152 cc rust-lang#34529 (new tracking issue)
std: Stabilize APIs for the 1.11.0 release Although the set of APIs being stabilized this release is relatively small, the trains keep going! Listed below are the APIs in the standard library which have either transitioned from unstable to stable or those from unstable to deprecated. Stable * `BTreeMap::{append, split_off}` * `BTreeSet::{append, split_off}` * `Cell::get_mut` * `RefCell::get_mut` * `BinaryHeap::append` * `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past libstd stabilizations * `Iterator::sum` * `Iterator::product` Deprecated * `{f32, f64}::next_after` * `{f32, f64}::integer_decode` * `{f32, f64}::ldexp` * `{f32, f64}::frexp` * `num::One` * `num::Zero` Added APIs (all unstable) * `iter::Sum` * `iter::Product` * `iter::Step` - a few methods were added to accomodate deprecation of One/Zero Removed APIs * `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is unstable Closes #27739 Closes #27752 Closes #32526 Closes #33444 Closes #34152 cc #34529 (new tracking issue)
|
next_after is extremely useful for unit testing with floats... |
There are a number of floating point methods that are reexported from cmath, without a strong naming convention on the Rust side, or a clear rationale for which methods are included and which are not.
Ideally, someone who works with floating point, and these methods in particular, could offer advice/an RFC laying out a good vision for these methods.
The text was updated successfully, but these errors were encountered: