Skip to content

Commit 58b46b1

Browse files
committed
Fix is_subnormal doc tests
1 parent 90b8981 commit 58b46b1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/float.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ pub trait FloatCore: Num + NumCast + Neg<Output = Self> + PartialOrd + Copy {
244244
/// Returns `true` if the number is [subnormal].
245245
///
246246
/// ```
247+
/// use num_traits::float::FloatCore;
248+
/// use std::f64;
249+
///
247250
/// let min = f64::MIN_POSITIVE; // 2.2250738585072014e-308_f64
248251
/// let max = f64::MAX;
249252
/// let lower_than_min = 1.0e-308_f64;
@@ -1157,6 +1160,9 @@ pub trait Float: Num + Copy + NumCast + PartialOrd + Neg<Output = Self> {
11571160
/// Returns `true` if the number is [subnormal].
11581161
///
11591162
/// ```
1163+
/// use num_traits::Float;
1164+
/// use std::f64;
1165+
///
11601166
/// let min = f64::MIN_POSITIVE; // 2.2250738585072014e-308_f64
11611167
/// let max = f64::MAX;
11621168
/// let lower_than_min = 1.0e-308_f64;

0 commit comments

Comments
 (0)