Skip to content

Commit 55fdeac

Browse files
committed
Fix syntax error
1 parent 654257d commit 55fdeac

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

library/std/build.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,12 @@ fn main() {
150150
// LLVM lowers `fp128` math to `long double` symbols even on platforms where
151151
// `long double` is not IEEE binary128. See
152152
// <https://github.com/llvm/llvm-project/issues/44744>.
153+
// This rules out any <= 32-bit plaftofms because their `long double` is `f64`, as well
154+
// as anything other than Linux for the same reason. `x86` has 80-bit `long double` so
155+
// also suffers from the problem.
153156
("x86_64", _) => false,
154-
_ => true,
157+
(_, "linux") if target_pointer_width == 64 => true,
158+
_ => false,
155159
};
156160

157161
if has_reliable_f16 {

library/std/src/f128/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ fn test_powf() {
447447
assert_eq!(1.0f128.powf(1.0), 1.0);
448448
assert_approx_eq!(3.4f128.powf(4.5), 246.40818323761892815995637964326426756, TOL_P2);
449449
assert_approx_eq!(2.7f128.powf(-3.2), 0.041652009108526178281070304373500889273, TOL_N2);
450-
assert_approx_eq!((-3.1f128).powf(2.0), 9.61000000000000055067062021407765193876 TOL_P2);
450+
assert_approx_eq!((-3.1f128).powf(2.0), 9.6100000000000005506706202140776519387, TOL_P2);
451451
assert_approx_eq!(5.9f128.powf(-2.0), 0.028727377190462507313100483690639638451, TOL_N2);
452452
assert_eq!(8.3f128.powf(0.0), 1.0);
453453
assert!(nan.powf(2.0).is_nan());

0 commit comments

Comments
 (0)