Skip to content

Commit d5a250f

Browse files
authored
Rollup merge of #127047 - tspiteri:f128-aconsts-lsd, r=tgross35
fix least significant digits of f128 associated constants While the numbers are parsed to the correct value, the decimal numbers in the source were rounded to zero instead of to the nearest, making the literals different from the values shown in the documentation.
2 parents 5e13c36 + dab77c5 commit d5a250f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/num/f128.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,15 @@ impl f128 {
170170
/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
171171
/// [`MANTISSA_DIGITS`]: f128::MANTISSA_DIGITS
172172
#[unstable(feature = "f128", issue = "116909")]
173-
pub const EPSILON: f128 = 1.92592994438723585305597794258492731e-34_f128;
173+
pub const EPSILON: f128 = 1.92592994438723585305597794258492732e-34_f128;
174174

175175
/// Smallest finite `f128` value.
176176
///
177177
/// Equal to −[`MAX`].
178178
///
179179
/// [`MAX`]: f128::MAX
180180
#[unstable(feature = "f128", issue = "116909")]
181-
pub const MIN: f128 = -1.18973149535723176508575932662800701e+4932_f128;
181+
pub const MIN: f128 = -1.18973149535723176508575932662800702e+4932_f128;
182182
/// Smallest positive normal `f128` value.
183183
///
184184
/// Equal to 2<sup>[`MIN_EXP`]&nbsp;&minus;&nbsp;1</sup>.
@@ -194,7 +194,7 @@ impl f128 {
194194
/// [`MANTISSA_DIGITS`]: f128::MANTISSA_DIGITS
195195
/// [`MAX_EXP`]: f128::MAX_EXP
196196
#[unstable(feature = "f128", issue = "116909")]
197-
pub const MAX: f128 = 1.18973149535723176508575932662800701e+4932_f128;
197+
pub const MAX: f128 = 1.18973149535723176508575932662800702e+4932_f128;
198198

199199
/// One greater than the minimum possible normal power of 2 exponent.
200200
///

0 commit comments

Comments
 (0)