3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 16:45:31 +00:00

fix a bug in column patching

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-03-29 13:51:39 -07:00
parent 7a950dd667
commit 9be7bda69a
2 changed files with 3 additions and 3 deletions

View file

@ -2399,7 +2399,7 @@ bool lar_solver::try_to_patch(lpvar j, const mpq& val, std::function<bool (lpvar
if (!inside_bounds(j, ival))
return false;
impq delta = ival - get_column_value(j);
impq delta = get_column_value(j) - ival;
for (const auto &c : A_r().column(j)) {
unsigned row_index = c.var();
const mpq & a = c.coeff();
@ -2416,7 +2416,7 @@ bool lar_solver::try_to_patch(lpvar j, const mpq& val, std::function<bool (lpvar
unsigned row_index = c.var();
const mpq & a = c.coeff();
unsigned rj = m_mpq_lar_core_solver.m_r_basis[row_index];
set_column_value(rj,a * delta + get_column_value(rj));
m_mpq_lar_core_solver.m_r_solver.add_delta_to_x(rj, a * delta);
report_change(rj);
}
return true;

View file

@ -1357,7 +1357,7 @@ void core::update_to_refine_of_var(lpvar j) {
void core::patch_real_var(lpvar j) {
void core::patch_real_var(lpvar j) {
SASSERT(!var_is_int(j));
rational v = mul_val(emons()[j]);
if (val(j) == v)