Skip to content

Commit d40e73e

Browse files
authored
Fixed a tiny bug regarding comparing the difference to epsilon
1 parent 533b0e9 commit d40e73e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dawson.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func ToleranceF64(a, b, e float64) bool {
3030
e = -e
3131
}
3232
}
33-
return d < e
33+
return d <= e
3434
}
3535

3636
// TolereranceF32 is a test to see if two float64s, a and b are equal,
@@ -56,7 +56,7 @@ func ToleranceF32(a, b, e float32) bool {
5656
e = -e
5757
}
5858
}
59-
return d < e
59+
return d <= e
6060
}
6161

6262
// ToleranceC128 is a test to see if two float64s, a and b are equal,

0 commit comments

Comments
 (0)