We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5902f08 commit e924310Copy full SHA for e924310
src/float.rs
@@ -2434,7 +2434,7 @@ mod tests {
2434
let deviation = recovered_input - input;
2435
2436
assert!(
2437
- deviation.abs() < $tolerance,
+ recovered_input == input || deviation.abs() < $tolerance,
2438
"failed to recover input of `Float::integer_decode({0:e})`
2439
\t expected: ~ {:e}
2440
\t found: {:e}
@@ -2469,6 +2469,7 @@ mod tests {
2469
check(sign_f * 5____f32, 0xa00000, -21, sign);
2470
check(sign_f * 42___f32, 0xa80000, -18, sign);
2471
check(sign_f * f32::MAX, 0xffffff, 104, sign);
2472
+ check(sign_f * f32::INFINITY, 0x800000, 105, sign);
2473
}
2474
2475
@@ -2492,6 +2493,7 @@ mod tests {
2492
2493
check(sign_f * 5____f64, 0x14000000000000, -50, sign);
2494
check(sign_f * 42___f64, 0x15000000000000, -47, sign);
2495
check(sign_f * f64::MAX, 0x1fffffffffffff, 971, sign);
2496
+ check(sign_f * f64::INFINITY, 0x10000000000000, 972, sign);
2497
2498
2499
0 commit comments