@@ -743,20 +743,23 @@ impl f64 {
743
743
/// is finite `x == x.next_up().next_down()` also holds.
744
744
///
745
745
/// ```rust
746
- /// #![feature(float_next_up_down)]
747
746
/// // f64::EPSILON is the difference between 1.0 and the next number up.
748
747
/// assert_eq!(1.0f64.next_up(), 1.0 + f64::EPSILON);
749
748
/// // But not for most numbers.
750
749
/// assert!(0.1f64.next_up() < 0.1 + f64::EPSILON);
751
750
/// assert_eq!(9007199254740992f64.next_up(), 9007199254740994.0);
752
751
/// ```
753
752
///
753
+ /// This operation corresponds to IEEE-754 `nextUp`.
754
+ ///
754
755
/// [`NEG_INFINITY`]: Self::NEG_INFINITY
755
756
/// [`INFINITY`]: Self::INFINITY
756
757
/// [`MIN`]: Self::MIN
757
758
/// [`MAX`]: Self::MAX
758
759
#[ inline]
759
- #[ unstable( feature = "float_next_up_down" , issue = "91399" ) ]
760
+ #[ doc( alias = "nextUp" ) ]
761
+ #[ stable( feature = "float_next_up_down" , since = "CURRENT_RUSTC_VERSION" ) ]
762
+ #[ rustc_const_stable( feature = "float_next_up_down" , since = "CURRENT_RUSTC_VERSION" ) ]
760
763
pub const fn next_up ( self ) -> Self {
761
764
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
762
765
// denormals to zero. This is in general unsound and unsupported, but here
@@ -791,20 +794,23 @@ impl f64 {
791
794
/// is finite `x == x.next_down().next_up()` also holds.
792
795
///
793
796
/// ```rust
794
- /// #![feature(float_next_up_down)]
795
797
/// let x = 1.0f64;
796
798
/// // Clamp value into range [0, 1).
797
799
/// let clamped = x.clamp(0.0, 1.0f64.next_down());
798
800
/// assert!(clamped < 1.0);
799
801
/// assert_eq!(clamped.next_up(), 1.0);
800
802
/// ```
801
803
///
804
+ /// This operation corresponds to IEEE-754 `nextDown`.
805
+ ///
802
806
/// [`NEG_INFINITY`]: Self::NEG_INFINITY
803
807
/// [`INFINITY`]: Self::INFINITY
804
808
/// [`MIN`]: Self::MIN
805
809
/// [`MAX`]: Self::MAX
806
810
#[ inline]
807
- #[ unstable( feature = "float_next_up_down" , issue = "91399" ) ]
811
+ #[ doc( alias = "nextDown" ) ]
812
+ #[ stable( feature = "float_next_up_down" , since = "CURRENT_RUSTC_VERSION" ) ]
813
+ #[ rustc_const_stable( feature = "float_next_up_down" , since = "CURRENT_RUSTC_VERSION" ) ]
808
814
pub const fn next_down ( self ) -> Self {
809
815
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
810
816
// denormals to zero. This is in general unsound and unsupported, but here
0 commit comments