Skip to content

Commit

Permalink
floattidf: test ignore last bit
Browse files Browse the repository at this point in the history
Its possible that the generated f64 is different from the expected one
by one bit. This is legal when both values are equally close to the i128.

In the end this is most likely due to inconsistencies in different (conformant)
hardware implementations of int -> floating point conversion utilities.
  • Loading branch information
est31 committed May 7, 2017
1 parent e574d8b commit 2abbc3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ static TEST_CASES: &[((i128,), u64)] = &[
fn floattidf() {
for &((a,), b) in TEST_CASES {
let b_ = __floattidf(a);
assert_eq!(((a,), b), ((a,), to_u64(b_)));
assert_eq!(((a,), b | 1), ((a,), to_u64(b_) | 1));
}
}
"
Expand Down

0 comments on commit 2abbc3c

Please sign in to comment.