mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
Fix bug reported by Florian <corzilius@cs.rwth-aachen.de>
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
a60b53bfd8
commit
42898f3276
|
@ -993,8 +993,22 @@ namespace nlsat {
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (s == -1 && !is_even) {
|
else {
|
||||||
atom_sign = -atom_sign;
|
// We have shown the current factor is a constant MODULO the sign of the leading coefficient (of the equation used to rewrite the factor).
|
||||||
|
if (!info.m_lc_const) {
|
||||||
|
// If the leading coefficient is not a constant, we must store this information as an extra assumption.
|
||||||
|
if (d % 2 == 0 || // d is even
|
||||||
|
is_even || // rewriting a factor of even degree, sign flip doesn't matter
|
||||||
|
_a->get_kind() == atom::EQ) { // rewriting an equation, sign flip doesn't matter
|
||||||
|
info.add_lc_diseq();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
info.add_lc_ineq();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (s == -1 && !is_even) {
|
||||||
|
atom_sign = -atom_sign;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue