@@ -743,20 +743,23 @@ impl f64 {
743743 /// is finite `x == x.next_up().next_down()` also holds.
744744 ///
745745 /// ```rust
746- /// #![feature(float_next_up_down)]
747746 /// // f64::EPSILON is the difference between 1.0 and the next number up.
748747 /// assert_eq!(1.0f64.next_up(), 1.0 + f64::EPSILON);
749748 /// // But not for most numbers.
750749 /// assert!(0.1f64.next_up() < 0.1 + f64::EPSILON);
751750 /// assert_eq!(9007199254740992f64.next_up(), 9007199254740994.0);
752751 /// ```
753752 ///
753+ /// This operation corresponds to IEEE-754 `nextUp`.
754+ ///
754755 /// [`NEG_INFINITY`]: Self::NEG_INFINITY
755756 /// [`INFINITY`]: Self::INFINITY
756757 /// [`MIN`]: Self::MIN
757758 /// [`MAX`]: Self::MAX
758759 #[ 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" ) ]
760763 pub const fn next_up ( self ) -> Self {
761764 // Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
762765 // denormals to zero. This is in general unsound and unsupported, but here
@@ -791,20 +794,23 @@ impl f64 {
791794 /// is finite `x == x.next_down().next_up()` also holds.
792795 ///
793796 /// ```rust
794- /// #![feature(float_next_up_down)]
795797 /// let x = 1.0f64;
796798 /// // Clamp value into range [0, 1).
797799 /// let clamped = x.clamp(0.0, 1.0f64.next_down());
798800 /// assert!(clamped < 1.0);
799801 /// assert_eq!(clamped.next_up(), 1.0);
800802 /// ```
801803 ///
804+ /// This operation corresponds to IEEE-754 `nextDown`.
805+ ///
802806 /// [`NEG_INFINITY`]: Self::NEG_INFINITY
803807 /// [`INFINITY`]: Self::INFINITY
804808 /// [`MIN`]: Self::MIN
805809 /// [`MAX`]: Self::MAX
806810 #[ 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" ) ]
808814 pub const fn next_down ( self ) -> Self {
809815 // Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
810816 // denormals to zero. This is in general unsound and unsupported, but here
0 commit comments