Skip to content

Commit

Permalink
Adding error message that indicates a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
msoos committed Jan 10, 2024
1 parent 585a568 commit 8b2c21a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/counter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8b2c21a

Please sign in to comment.