Skip to content

Commit 0312dda

Browse files
committed
---
yaml --- r: 273353 b: refs/heads/beta c: ba89b25 h: refs/heads/master i: 273351: 7a2bac9
1 parent d7887fa commit 0312dda

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: e22d6d569fcbcf960261d71f67d554a7859fdfeb
26+
refs/heads/beta: ba89b255e86817e0a2f43198a6b802dafbc6ae9e
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/test/run-pass/float_math.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@
1212

1313
use std::intrinsics::{fadd_fast, fsub_fast, fmul_fast, fdiv_fast, frem_fast};
1414

15-
fn main() {
15+
#[inline(never)]
16+
pub fn test_operations(a: f64, b: f64) {
1617
// make sure they all map to the correct operation
1718
unsafe {
18-
assert_eq!(fadd_fast(1., 2.), 1. + 2.);
19-
assert_eq!(fsub_fast(1., 2.), 1. - 2.);
20-
assert_eq!(fmul_fast(2., 3.), 2. * 3.);
21-
assert_eq!(fdiv_fast(10., 5.), 10. / 5.);
22-
assert_eq!(frem_fast(10., 5.), 10. % 5.);
19+
assert_eq!(fadd_fast(a, b), a + b);
20+
assert_eq!(fsub_fast(a, b), a - b);
21+
assert_eq!(fmul_fast(a, b), a * b);
22+
assert_eq!(fdiv_fast(a, b), a / b);
23+
assert_eq!(frem_fast(a, b), a % b);
2324
}
2425
}
26+
27+
fn main() {
28+
test_operations(1., 2.);
29+
test_operations(10., 5.);
30+
}

0 commit comments

Comments
 (0)