diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2024-07-16 02:02:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-16 02:02:24 -0500 |
| commit | 57fef31096b56d2a4ccb2c11fee6cbbbc04750a9 (patch) | |
| tree | aa08eedac896a18f776d3a3cd93d7a44d50fb55c | |
| parent | 12fd2f94b389d9510db0f8a948a98f402aeb0c0b (diff) | |
| parent | dab77c50daeb563a05b20b31527f731b683cded5 (diff) | |
| download | rust-57fef31096b56d2a4ccb2c11fee6cbbbc04750a9.tar.gz rust-57fef31096b56d2a4ccb2c11fee6cbbbc04750a9.zip | |
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.
| -rw-r--r-- | library/core/src/num/f128.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/num/f128.rs b/library/core/src/num/f128.rs index 002a41b5669..05dc1e97852 100644 --- a/library/core/src/num/f128.rs +++ b/library/core/src/num/f128.rs @@ -170,7 +170,7 @@ 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. /// @@ -178,7 +178,7 @@ impl f128 { /// /// [`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`] − 1</sup>. @@ -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. /// |
