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.
prec::almost_eq
1 parent 09939ce commit 885a098Copy full SHA for 885a098
src/prec.rs
@@ -13,7 +13,7 @@ pub const DEFAULT_F64_ACC: f64 = 0.0000000000000011102230246251565;
13
/// using a maximum absolute difference (epsilon) of `acc`.
14
pub fn almost_eq(a: f64, b: f64, acc: f64) -> bool {
15
if a.is_infinite() && b.is_infinite() {
16
- return true;
+ return a == b;
17
}
18
a.abs_diff_eq(&b, acc)
19
0 commit comments