3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

fix a bug in nla_solver's divide

Signed-off-by: Lev <levnach@hotmail.com>
This commit is contained in:
Lev 2018-12-04 15:41:35 -10:00 committed by Lev Nachmanson
parent c30190f941
commit 5c0f76a702
2 changed files with 11 additions and 2 deletions

View file

@ -1335,6 +1335,10 @@ std::ostream& lar_solver::print_left_side_of_constraint(const lar_base_constrain
}
std::ostream& lar_solver::print_term(lar_term const& term, std::ostream & out) const {
if (term.size() == 0){
out << "0";
return out;
}
bool first = true;
for (const auto p : term) {
mpq val = p.coeff();

View file

@ -46,7 +46,7 @@ bool is_factor(const T & a, const T & b) {
continue;
}
i++;
j++;
}
}
@ -1074,7 +1074,12 @@ struct solver::imp {
const rooted_mon& bd,
const factor& b,
const factor& d) {
TRACE("nla_solver",
tout << "factor a = ";
print_factor(a, tout);
tout << ", factor b = ";
print_factor(b, tout););
auto ac_m = vvr(a) * vvr(c);
auto bd_m = vvr(b) * vvr(d);