Skip to content

Commit cc28bb1

Browse files
committed
Fix quickcheck float comparison
1 parent 7a95e44 commit cc28bb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/float/add.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,13 @@ mod test {
207207
fn addsf3(a: U32, b: U32) -> bool {
208208
let (a, b) = (a.0, b.0);
209209
let r = super::__addsf3(f32::from_repr(a), f32::from_repr(b));
210-
r == f32::from_repr(a) + f32::from_repr(b)
210+
r.repr() == (f32::from_repr(a) + f32::from_repr(b)).repr()
211211
}
212212

213213
fn adddf3(a: U64, b: U64) -> bool {
214214
let (a, b) = (a.0, b.0);
215215
let r = super::__adddf3(f64::from_repr(a), f64::from_repr(b));
216-
r == f64::from_repr(a) + f64::from_repr(b)
216+
r.repr() == (f64::from_repr(a) + f64::from_repr(b)).repr()
217217
}
218218
}
219219

0 commit comments

Comments
 (0)