Skip to content

Commit 4b500ae

Browse files
change tests to use fixed constants to let them pass with miri
1 parent 21fef8c commit 4b500ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/pass/float.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ pub fn libm() {
10341034
assert_approx_eq!(400f64.powf(0.5f64), 20f64);
10351035

10361036
// Some inputs to powf and powi result in fixed outputs
1037-
// and thus must be exactly equal to that value
1037+
// and thus must be exactly equal to that value.
10381038
// C standard says:
10391039
// 1^y = 1 for any y, even a NaN.
10401040
assert_eq!(1f32.powf(10.0), 1.0);
@@ -1069,11 +1069,13 @@ pub fn libm() {
10691069

10701070
// For pow (powf in rust) the C standard says:
10711071
// x^0 = 1 for all x even a sNaN
1072+
// FIXME(#4286): this does not match the behavior of all implementations.
10721073
assert_eq!(SNAN_F32.powf(0.0), 1.0);
10731074
assert_eq!(SNAN_F64.powf(0.0), 1.0);
10741075

10751076
// For pown (powi in rust) the C standard says:
10761077
// x^0 = 1 for all x even a sNaN
1078+
// FIXME(#4286): this does not match the behavior of all implementations.
10771079
assert_eq!(SNAN_F32.powi(0), 1.0);
10781080
assert_eq!(SNAN_F64.powi(0), 1.0);
10791081

0 commit comments

Comments
 (0)