Skip to content

Commit

Permalink
Adjust precision
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Aug 2, 2024
1 parent 767d454 commit e9ef0f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/kani/Intrinsics/Math/Arith/powi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
fn verify_powi32() {
let x: f32 = kani::any();
kani::assume(x.is_normal());
kani::assume(x >= 1e-19 || x <= -1e-19);
kani::assume(x <= 1.84e19 && x >= -1.84e19);
let x2 = x.powi(2);
assert!(x2 >= 0.0);
}
Expand All @@ -13,6 +15,8 @@ fn verify_powi32() {
fn verify_powi64() {
let x: f64 = kani::any();
kani::assume(x.is_normal());
kani::assume(x >= 1e-153 || x <= -1e-153);
kani::assume(x <= 1.34e154 && x >= -1.34e154);
let x2 = x.powi(2);
assert!(x2 >= 0.0);
}

0 comments on commit e9ef0f8

Please sign in to comment.