Skip to content

Commit 6c93504

Browse files
committed
Increase tolerance of stats comparison
1 parent bca557e commit 6c93504

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

c/stats.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void Stats::verify_stat(Stat s, T value, F getter) const {
115115
T test_value = getter();
116116
if (value == test_value) return;
117117
if (std::is_floating_point<T>::value && (value != 0) &&
118-
std::abs(1.0 - static_cast<double>(test_value/value)) < 1e-14) return;
118+
std::abs(1.0 - static_cast<double>(test_value/value)) < 1e-12) return;
119119
throw AssertionError()
120120
<< "Stored " << stat_name(s) << " stat is " << value
121121
<< ", whereas computed " << stat_name(s) << " is " << getter();

0 commit comments

Comments
 (0)