Skip to content

Commit

Permalink
Correct MIN_EXP docs and improve EPSILON
Browse files Browse the repository at this point in the history
  • Loading branch information
ollie27 committed Jun 30, 2016
1 parent 170df14 commit 2dcfa62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/libcore/num/f32.rs
Expand Up @@ -31,7 +31,7 @@ pub const MANTISSA_DIGITS: u32 = 24;
#[stable(feature = "rust1", since = "1.0.0")]
pub const DIGITS: u32 = 6;

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

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

/// Minimum possible normal power of 2 exponent.
/// One greater than the minimum possible normal power of 2 exponent.
#[stable(feature = "rust1", since = "1.0.0")]
pub const MIN_EXP: i32 = -125;
/// Maximum possible power of 2 exponent.
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/num/f64.rs
Expand Up @@ -31,7 +31,7 @@ pub const MANTISSA_DIGITS: u32 = 53;
#[stable(feature = "rust1", since = "1.0.0")]
pub const DIGITS: u32 = 15;

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

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

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

0 comments on commit 2dcfa62

Please sign in to comment.