summary refs log tree commit diff
path: root/src/libcore/num
diff options
context:
space:
mode:
authorOliver Middleton <olliemail27@gmail.com>2016-06-30 08:30:30 +0100
committerOliver Middleton <olliemail27@gmail.com>2016-06-30 08:30:30 +0100
commit2dcfa628768af55b07931c8717e92ddf2f70940d (patch)
tree079b95100e4873415f9c63d59e6d20df94aa930e /src/libcore/num
parent170df14e6223a4583d5d88bac04434b2491aacb3 (diff)
downloadrust-2dcfa628768af55b07931c8717e92ddf2f70940d.tar.gz
rust-2dcfa628768af55b07931c8717e92ddf2f70940d.zip
Correct MIN_EXP docs and improve EPSILON
Diffstat (limited to 'src/libcore/num')
-rw-r--r--src/libcore/num/f32.rs4
-rw-r--r--src/libcore/num/f64.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs
index 0caa27f21dc..c408b10c399 100644
--- a/src/libcore/num/f32.rs
+++ b/src/libcore/num/f32.rs
@@ -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;
 
@@ -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.
diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs
index 766e83a8953..006e9d1264d 100644
--- a/src/libcore/num/f64.rs
+++ b/src/libcore/num/f64.rs
@@ -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;
 
@@ -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.