3
0
Fork 0
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:
Lev Nachmanson 2019-12-31 12:44:38 -08:00
parent 216affd852
commit ef39c4b533

View file

@ -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);