Skip to content

Commit e2f114a

Browse files
committed
test FMA a bit more
1 parent 9c9a947 commit e2f114a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/run-pass/intrinsics-math.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ pub fn main() {
5050
assert_approx_eq!(8f32.log2(), 3f32);
5151
assert_approx_eq!(f64::consts::E.log2(), f64::consts::LOG2_E);
5252

53-
assert_approx_eq!(1.0f32.mul_add(2.0f32, 5.0f32), 7.0f32);
54-
assert_approx_eq!(0.0f64.mul_add(-2.0f64, f64::consts::E), f64::consts::E);
53+
assert_approx_eq!(3.0f32.mul_add(2.0f32, 5.0f32), 11.0);
54+
assert_eq!(0.0f32.mul_add(-2.0, f32::consts::E), f32::consts::E);
55+
assert_approx_eq!(3.0f64.mul_add(2.0, 5.0), 11.0);
56+
assert_eq!(0.0f64.mul_add(-2.0f64, f64::consts::E), f64::consts::E);
5557

5658
assert_approx_eq!((-1.0f32).abs(), 1.0f32);
5759
assert_approx_eq!(34.2f64.abs(), 34.2f64);

0 commit comments

Comments
 (0)