Skip to content

Commit 02295f8

Browse files
committed
Fixed bug in close_naninf_to_tol() causing the real part comparison to be lost.
1 parent 07a1836 commit 02295f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,7 @@ mod test {
17731773
// Compare the imaginary parts
17741774
if a.im.is_finite() {
17751775
if b.im.is_finite() {
1776-
close = (a.im == b.im) || (a.im - b.im).abs() < tol;
1776+
close &= (a.im == b.im) || (a.im - b.im).abs() < tol;
17771777
} else {
17781778
close = false;
17791779
}

0 commit comments

Comments
 (0)