@@ -240,7 +240,7 @@ pub trait FloatCore: Num + NumCast + Neg<Output = Self> + PartialOrd + Copy {
240
240
fn is_normal ( self ) -> bool {
241
241
self . classify ( ) == FpCategory :: Normal
242
242
}
243
-
243
+
244
244
/// Returns `true` if the number is [subnormal].
245
245
///
246
246
/// ```
@@ -258,7 +258,8 @@ pub trait FloatCore: Num + NumCast + Neg<Output = Self> + PartialOrd + Copy {
258
258
/// // Values between `0` and `min` are Subnormal.
259
259
/// assert!(lower_than_min.is_subnormal());
260
260
/// ```
261
- /// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
261
+ /// [subnormal]: https://en.wikipedia.org/wiki/Subnormal_number
262
+ #[ inline]
262
263
fn is_subnormal ( self ) -> bool {
263
264
self . classify ( ) == FpCategory :: Subnormal
264
265
}
@@ -1146,7 +1147,7 @@ pub trait Float: Num + Copy + NumCast + PartialOrd + Neg<Output = Self> {
1146
1147
/// // Values between `0` and `min` are Subnormal.
1147
1148
/// assert!(!lower_than_min.is_normal());
1148
1149
/// ```
1149
- /// [subnormal]: http://en.wikipedia.org/wiki/Denormal_number
1150
+ /// [subnormal]: http://en.wikipedia.org/wiki/Subnormal_number
1150
1151
fn is_normal ( self ) -> bool ;
1151
1152
1152
1153
/// Returns `true` if the number is [subnormal].
@@ -1166,8 +1167,11 @@ pub trait Float: Num + Copy + NumCast + PartialOrd + Neg<Output = Self> {
1166
1167
/// // Values between `0` and `min` are Subnormal.
1167
1168
/// assert!(lower_than_min.is_subnormal());
1168
1169
/// ```
1169
- /// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
1170
- fn is_subnormal ( self ) -> bool ;
1170
+ /// [subnormal]: https://en.wikipedia.org/wiki/Subnormal_number
1171
+ #[ inline]
1172
+ fn is_subnormal ( self ) -> bool {
1173
+ self . classify ( ) == FpCategory :: Subnormal
1174
+ }
1171
1175
1172
1176
/// Returns the floating point category of the number. If only one property
1173
1177
/// is going to be tested, it is generally faster to use the specific
0 commit comments