Skip to content

Commit

Permalink
Rollup merge of rust-lang#127047 - tspiteri:f128-aconsts-lsd, r=tgross35
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tgross35 authored Jul 16, 2024
2 parents a778c83 + 2bd2069 commit 686f75b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/num/f128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ impl f128 {
/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
/// [`MANTISSA_DIGITS`]: f128::MANTISSA_DIGITS
#[unstable(feature = "f128", issue = "116909")]
pub const EPSILON: f128 = 1.92592994438723585305597794258492731e-34_f128;
pub const EPSILON: f128 = 1.92592994438723585305597794258492732e-34_f128;

/// Smallest finite `f128` value.
///
/// Equal to −[`MAX`].
///
/// [`MAX`]: f128::MAX
#[unstable(feature = "f128", issue = "116909")]
pub const MIN: f128 = -1.18973149535723176508575932662800701e+4932_f128;
pub const MIN: f128 = -1.18973149535723176508575932662800702e+4932_f128;
/// Smallest positive normal `f128` value.
///
/// Equal to 2<sup>[`MIN_EXP`]&nbsp;&minus;&nbsp;1</sup>.
Expand All @@ -194,7 +194,7 @@ impl f128 {
/// [`MANTISSA_DIGITS`]: f128::MANTISSA_DIGITS
/// [`MAX_EXP`]: f128::MAX_EXP
#[unstable(feature = "f128", issue = "116909")]
pub const MAX: f128 = 1.18973149535723176508575932662800701e+4932_f128;
pub const MAX: f128 = 1.18973149535723176508575932662800702e+4932_f128;

/// One greater than the minimum possible normal power of 2 exponent.
///
Expand Down

0 comments on commit 686f75b

Please sign in to comment.