Skip to content

Commit 2dcfa62

Browse files
committed
Correct MIN_EXP docs and improve EPSILON
1 parent 170df14 commit 2dcfa62

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libcore/num/f32.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub const MANTISSA_DIGITS: u32 = 24;
3131
#[stable(feature = "rust1", since = "1.0.0")]
3232
pub const DIGITS: u32 = 6;
3333

34-
/// A very small number.
34+
/// Difference between `1.0` and the next largest representable number.
3535
#[stable(feature = "rust1", since = "1.0.0")]
3636
pub const EPSILON: f32 = 1.19209290e-07_f32;
3737

@@ -45,7 +45,7 @@ pub const MIN_POSITIVE: f32 = 1.17549435e-38_f32;
4545
#[stable(feature = "rust1", since = "1.0.0")]
4646
pub const MAX: f32 = 3.40282347e+38_f32;
4747

48-
/// Minimum possible normal power of 2 exponent.
48+
/// One greater than the minimum possible normal power of 2 exponent.
4949
#[stable(feature = "rust1", since = "1.0.0")]
5050
pub const MIN_EXP: i32 = -125;
5151
/// Maximum possible power of 2 exponent.

src/libcore/num/f64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub const MANTISSA_DIGITS: u32 = 53;
3131
#[stable(feature = "rust1", since = "1.0.0")]
3232
pub const DIGITS: u32 = 15;
3333

34-
/// A very small number.
34+
/// Difference between `1.0` and the next largest representable number.
3535
#[stable(feature = "rust1", since = "1.0.0")]
3636
pub const EPSILON: f64 = 2.2204460492503131e-16_f64;
3737

@@ -45,7 +45,7 @@ pub const MIN_POSITIVE: f64 = 2.2250738585072014e-308_f64;
4545
#[stable(feature = "rust1", since = "1.0.0")]
4646
pub const MAX: f64 = 1.7976931348623157e+308_f64;
4747

48-
/// Minimum possible normal power of 2 exponent.
48+
/// One greater than the minimum possible normal power of 2 exponent.
4949
#[stable(feature = "rust1", since = "1.0.0")]
5050
pub const MIN_EXP: i32 = -1021;
5151
/// Maximum possible power of 2 exponent.

0 commit comments

Comments
 (0)