@@ -4009,65 +4009,58 @@ pub enum FpCategory {
4009
4009
Normal ,
4010
4010
}
4011
4011
4012
- /// A built-in floating point number.
4012
+ // Technically private and only exposed for coretests:
4013
4013
#[ doc( hidden) ]
4014
- #[ unstable( feature = "core_float " ,
4015
- reason = "stable interface is via `impl f{32,64}` in later crates " ,
4016
- issue = "32110 " ) ]
4014
+ #[ unstable( feature = "float_internals " ,
4015
+ reason = "internal routines only exposed for testing " ,
4016
+ issue = "0 " ) ]
4017
4017
pub trait Float : Sized {
4018
4018
/// Type used by `to_bits` and `from_bits`.
4019
- #[ stable( feature = "core_float_bits" , since = "1.25.0" ) ]
4020
4019
type Bits ;
4021
4020
4022
4021
/// Returns `true` if this value is NaN and false otherwise.
4023
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4024
4022
fn is_nan ( self ) -> bool ;
4023
+
4025
4024
/// Returns `true` if this value is positive infinity or negative infinity and
4026
4025
/// false otherwise.
4027
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4028
4026
fn is_infinite ( self ) -> bool ;
4027
+
4029
4028
/// Returns `true` if this number is neither infinite nor NaN.
4030
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4031
4029
fn is_finite ( self ) -> bool ;
4030
+
4032
4031
/// Returns `true` if this number is neither zero, infinite, denormal, or NaN.
4033
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4034
4032
fn is_normal ( self ) -> bool ;
4033
+
4035
4034
/// Returns the category that this number falls into.
4036
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4037
4035
fn classify ( self ) -> FpCategory ;
4038
4036
4039
4037
/// Returns `true` if `self` is positive, including `+0.0` and
4040
4038
/// `Float::infinity()`.
4041
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4042
4039
fn is_sign_positive ( self ) -> bool ;
4040
+
4043
4041
/// Returns `true` if `self` is negative, including `-0.0` and
4044
4042
/// `Float::neg_infinity()`.
4045
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4046
4043
fn is_sign_negative ( self ) -> bool ;
4047
4044
4048
4045
/// Take the reciprocal (inverse) of a number, `1/x`.
4049
- #[ stable( feature = "core" , since = "1.6.0" ) ]
4050
4046
fn recip ( self ) -> Self ;
4051
4047
4052
4048
/// Convert radians to degrees.
4053
- #[ stable( feature = "deg_rad_conversions" , since="1.7.0" ) ]
4054
4049
fn to_degrees ( self ) -> Self ;
4050
+
4055
4051
/// Convert degrees to radians.
4056
- #[ stable( feature = "deg_rad_conversions" , since="1.7.0" ) ]
4057
4052
fn to_radians ( self ) -> Self ;
4058
4053
4059
4054
/// Returns the maximum of the two numbers.
4060
- #[ stable( feature = "core_float_min_max" , since="1.20.0" ) ]
4061
4055
fn max ( self , other : Self ) -> Self ;
4056
+
4062
4057
/// Returns the minimum of the two numbers.
4063
- #[ stable( feature = "core_float_min_max" , since="1.20.0" ) ]
4064
4058
fn min ( self , other : Self ) -> Self ;
4065
4059
4066
4060
/// Raw transmutation to integer.
4067
- #[ stable( feature = "core_float_bits" , since="1.25.0" ) ]
4068
4061
fn to_bits ( self ) -> Self :: Bits ;
4062
+
4069
4063
/// Raw transmutation from integer.
4070
- #[ stable( feature = "core_float_bits" , since="1.25.0" ) ]
4071
4064
fn from_bits ( v : Self :: Bits ) -> Self ;
4072
4065
}
4073
4066
0 commit comments