mirror of
https://github.com/Z3Prover/z3
synced 2025-04-16 13:58:45 +00:00
ignore term's zero coefficients in add_monomial()
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
216affd852
commit
ef39c4b533
|
@ -29,6 +29,8 @@ class lar_term {
|
|||
public:
|
||||
lar_term() {}
|
||||
void add_monomial(const mpq& c, unsigned j) {
|
||||
if (c.is_zero())
|
||||
return;
|
||||
auto *e = m_coeffs.find_core(j);
|
||||
if (e == nullptr) {
|
||||
m_coeffs.insert(j, c);
|
||||
|
|
Loading…
Reference in a new issue