Skip to content

Commit 5ca191c

Browse files
authored
Rollup merge of rust-lang#66837 - ohadravid:epsilon-doc, r=dtolnay
Clarify `{f32,f64}::EPSILON` docs The doc for `EPSILON` says: > This is the difference between `1.0` and the next **largest** representable number. Which is a bit unclear. [Wikipedia](https://en.wikipedia.org/wiki/Machine_epsilon) says > Machine epsilon is defined as the difference between 1 and the next **larger** floating point number So this PR update the docs to match the Wikipedia version. The original PR also has this in a [comment](rust-lang#50919 (comment)).
2 parents 182a2ee + 85a468b commit 5ca191c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libcore/num/f32.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub const DIGITS: u32 = 6;
2626

2727
/// [Machine epsilon] value for `f32`.
2828
///
29-
/// This is the difference between `1.0` and the next largest representable number.
29+
/// This is the difference between `1.0` and the next larger representable number.
3030
///
3131
/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
3232
#[stable(feature = "rust1", since = "1.0.0")]

src/libcore/num/f64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub const DIGITS: u32 = 15;
2626

2727
/// [Machine epsilon] value for `f64`.
2828
///
29-
/// This is the difference between `1.0` and the next largest representable number.
29+
/// This is the difference between `1.0` and the next larger representable number.
3030
///
3131
/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
3232
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)