提交 12878a78 编写于 作者: C Corey Farwell

Provide more context for what the {f32,f64}::EPSILON values represent.

上级 22c25dd7
......@@ -33,7 +33,11 @@
#[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;
......
......@@ -33,7 +33,11 @@
#[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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册