@@ -4098,65 +4098,58 @@ pub enum FpCategory {
4098
4098
Normal ,
4099
4099
}
4100
4100
4101
- /// A built-in floating point number.
4101
+ // Technically private and only exposed for coretests:
4102
4102
#[ doc( hidden) ]
4103
- #[ unstable( feature = "core_float " ,
4104
- reason = "stable interface is via `impl f{32,64}` in later crates " ,
4105
- issue = "32110 " ) ]
4103
+ #[ unstable( feature = "float_internals " ,
4104
+ reason = "internal routines only exposed for testing " ,
4105
+ issue = "0 " ) ]
4106
4106
pub trait Float : Sized {
4107
4107
/// Type used by `to_bits` and `from_bits`.
4108
- #[ stable( feature = "core_float_bits" , since = "1.25.0" ) ]
4109
4108
type Bits ;
4110
4109
4111
4110
/// Returns `true` if this value is NaN and false otherwise.
4112
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4113
4111
fn is_nan ( self ) -> bool ;
4112
+
4114
4113
/// Returns `true` if this value is positive infinity or negative infinity and
4115
4114
/// false otherwise.
4116
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4117
4115
fn is_infinite ( self ) -> bool ;
4116
+
4118
4117
/// Returns `true` if this number is neither infinite nor NaN.
4119
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4120
4118
fn is_finite ( self ) -> bool ;
4119
+
4121
4120
/// Returns `true` if this number is neither zero, infinite, denormal, or NaN.
4122
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4123
4121
fn is_normal ( self ) -> bool ;
4122
+
4124
4123
/// Returns the category that this number falls into.
4125
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4126
4124
fn classify ( self ) -> FpCategory ;
4127
4125
4128
4126
/// Returns `true` if `self` is positive, including `+0.0` and
4129
4127
/// `Float::infinity()`.
4130
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4131
4128
fn is_sign_positive ( self ) -> bool ;
4129
+
4132
4130
/// Returns `true` if `self` is negative, including `-0.0` and
4133
4131
/// `Float::neg_infinity()`.
4134
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4135
4132
fn is_sign_negative ( self ) -> bool ;
4136
4133
4137
4134
/// Take the reciprocal (inverse) of a number, `1/x`.
4138
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4139
4135
fn recip ( self ) -> Self ;
4140
4136
4141
4137
/// Convert radians to degrees.
4142
- #[ stable( feature = "deg_rad_conversions" , since="1.7.0" ) ]
4143
4138
fn to_degrees ( self ) -> Self ;
4139
+
4144
4140
/// Convert degrees to radians.
4145
- #[ stable( feature = "deg_rad_conversions" , since="1.7.0" ) ]
4146
4141
fn to_radians ( self ) -> Self ;
4147
4142
4148
4143
/// Returns the maximum of the two numbers.
4149
- #[ stable( feature = "core_float_min_max" , since="1.20.0" ) ]
4150
4144
fn max ( self , other : Self ) -> Self ;
4145
+
4151
4146
/// Returns the minimum of the two numbers.
4152
- #[ stable( feature = "core_float_min_max" , since="1.20.0" ) ]
4153
4147
fn min ( self , other : Self ) -> Self ;
4154
4148
4155
4149
/// Raw transmutation to integer.
4156
- #[ stable( feature = "core_float_bits" , since="1.25.0" ) ]
4157
4150
fn to_bits ( self ) -> Self :: Bits ;
4151
+
4158
4152
/// Raw transmutation from integer.
4159
- #[ stable( feature = "core_float_bits" , since="1.25.0" ) ]
4160
4153
fn from_bits ( v : Self :: Bits ) -> Self ;
4161
4154
}
4162
4155
0 commit comments