Skip to content

Commit 2bd2069

Browse files
committed
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.
1 parent 6c38c60 commit 2bd2069

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/num/f128.rs

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

172172
/// Smallest finite `f128` value.
173173
///
174174
/// Equal to −[`MAX`].
175175
///
176176
/// [`MAX`]: f128::MAX
177177
#[unstable(feature = "f128", issue = "116909")]
178-
pub const MIN: f128 = -1.18973149535723176508575932662800701e+4932_f128;
178+
pub const MIN: f128 = -1.18973149535723176508575932662800702e+4932_f128;
179179
/// Smallest positive normal `f128` value.
180180
///
181181
/// Equal to 2<sup>[`MIN_EXP`]&nbsp;&minus;&nbsp;1</sup>.
@@ -191,7 +191,7 @@ impl f128 {
191191
/// [`MANTISSA_DIGITS`]: f128::MANTISSA_DIGITS
192192
/// [`MAX_EXP`]: f128::MAX_EXP
193193
#[unstable(feature = "f128", issue = "116909")]
194-
pub const MAX: f128 = 1.18973149535723176508575932662800701e+4932_f128;
194+
pub const MAX: f128 = 1.18973149535723176508575932662800702e+4932_f128;
195195

196196
/// One greater than the minimum possible normal power of 2 exponent.
197197
///

0 commit comments

Comments
 (0)