Fix test floating point comparison to tolerate imprecise FPUs.
This commit is contained in:
parent
587b0edbbf
commit
1e27d1994f
@ -1,7 +1,8 @@
|
||||
fn main() {
|
||||
let ε = 0.00001;
|
||||
let Π = 3.14;
|
||||
let लंच = Π * Π + 1.54;
|
||||
assert लंच - 1.54 == Π * Π;
|
||||
assert float::abs((लंच - 1.54) - (Π * Π)) < ε;
|
||||
assert საჭმელად_გემრიელი_სადილი() == 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user