From 8b2c21ab38334d2eeff914e23b99853949ca98cf Mon Sep 17 00:00:00 2001 From: Mate Soos Date: Wed, 10 Jan 2024 22:38:13 +0100 Subject: [PATCH] Adding error message that indicates a bug --- src/counter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/counter.cpp b/src/counter.cpp index 548610d..091f764 100644 --- a/src/counter.cpp +++ b/src/counter.cpp @@ -456,6 +456,11 @@ ApproxMC::SolCount Counter::calc_est_count() ; hash_it != numHashList.end() && cnt_it != numCountList.end() ; hash_it++, cnt_it++ ) { + if ((*hash_it) - minHash > 10) { + cout << "Internal ERROR: Something is VERY fishy, the difference between each count must" + " never be this large. Please report this bug to the maintainers" << endl; + exit(-1); + } *cnt_it *= pow(2, (*hash_it) - minHash); } ret_count.valid = true;