mirror of
https://github.com/Z3Prover/z3
synced 2025-06-05 21:53:23 +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
1 changed files with 2 additions and 0 deletions
|
@ -29,6 +29,8 @@ class lar_term {
|
||||||
public:
|
public:
|
||||||
lar_term() {}
|
lar_term() {}
|
||||||
void add_monomial(const mpq& c, unsigned j) {
|
void add_monomial(const mpq& c, unsigned j) {
|
||||||
|
if (c.is_zero())
|
||||||
|
return;
|
||||||
auto *e = m_coeffs.find_core(j);
|
auto *e = m_coeffs.find_core(j);
|
||||||
if (e == nullptr) {
|
if (e == nullptr) {
|
||||||
m_coeffs.insert(j, c);
|
m_coeffs.insert(j, c);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue