]> git.lizzy.rs Git - rust.git/commitdiff
Provide more context for what the {f32,f64}::EPSILON values represent.
authorCorey Farwell <coreyf@rwell.org>
Sun, 20 May 2018 16:39:13 +0000 (12:39 -0400)
committerCorey Farwell <coreyf@rwell.org>
Mon, 28 May 2018 13:28:40 +0000 (09:28 -0400)
src/libcore/num/f32.rs
src/libcore/num/f64.rs

index 718dd42a61535f6fd59fc405203709b8e6f39b1f..65332d4b97acc340124d4998e354afdfb47c7452 100644 (file)
 #[stable(feature = "rust1", since = "1.0.0")]
 pub const DIGITS: u32 = 6;
 
-/// Difference between `1.0` and the next largest representable number.
+/// [Machine epsilon] value for `f32`.
+///
+/// This is the difference between `1.0` and the next largest representable number.
+///
+/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
 #[stable(feature = "rust1", since = "1.0.0")]
 pub const EPSILON: f32 = 1.19209290e-07_f32;
 
index f128c55c78afa2aa59aaa12144d3c7478bfd9bbc..c9a643e7b334d96efa5e73690b719d1622472d1f 100644 (file)
 #[stable(feature = "rust1", since = "1.0.0")]
 pub const DIGITS: u32 = 15;
 
-/// Difference between `1.0` and the next largest representable number.
+/// [Machine epsilon] value for `f64`.
+///
+/// This is the difference between `1.0` and the next largest representable number.
+///
+/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
 #[stable(feature = "rust1", since = "1.0.0")]
 pub const EPSILON: f64 = 2.2204460492503131e-16_f64;