mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +00:00
bugfix in refactoring
This commit is contained in:
parent
0f0d3e55dc
commit
6f12c0e6f9
|
@ -16,7 +16,6 @@
|
||||||
--*/
|
--*/
|
||||||
#include"ackr_helper.h"
|
#include"ackr_helper.h"
|
||||||
|
|
||||||
|
|
||||||
double ackr_helper::calculate_lemma_bound(ackr_helper::fun2terms_map& occurrences) {
|
double ackr_helper::calculate_lemma_bound(ackr_helper::fun2terms_map& occurrences) {
|
||||||
fun2terms_map::iterator it = occurrences.begin();
|
fun2terms_map::iterator it = occurrences.begin();
|
||||||
const fun2terms_map::iterator end = occurrences.end();
|
const fun2terms_map::iterator end = occurrences.end();
|
||||||
|
|
|
@ -58,9 +58,10 @@ class ackr_helper {
|
||||||
/** \brief Calculate n choose 2. **/
|
/** \brief Calculate n choose 2. **/
|
||||||
inline static unsigned n_choose_2(unsigned n) { return n & 1 ? (n * (n >> 1)) : (n >> 1) * (n - 1); }
|
inline static unsigned n_choose_2(unsigned n) { return n & 1 ? (n * (n >> 1)) : (n >> 1) * (n - 1); }
|
||||||
|
|
||||||
|
/** \brief Calculate n choose 2 guarded for overflow. Returns infinity if unsafe. **/
|
||||||
inline static double n_choose_2_chk(unsigned n) {
|
inline static double n_choose_2_chk(unsigned n) {
|
||||||
SASSERT(std::numeric_limits<unsigned>().max() & 32);
|
SASSERT(std::numeric_limits<unsigned>().max() & 32);
|
||||||
return n & (1 << 16) ? n_choose_2(n) : std::numeric_limits<double>().infinity();;
|
return n & (1 << 16) ? std::numeric_limits<double>().infinity() : n_choose_2(n);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
bv_util m_bvutil;
|
bv_util m_bvutil;
|
||||||
|
|
Loading…
Reference in a new issue