mirror of
https://github.com/Z3Prover/z3
synced 2025-06-19 04:13:38 +00:00
check zero
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
860d904699
commit
5aec9b32bd
1 changed files with 2 additions and 0 deletions
|
@ -489,6 +489,8 @@ namespace opt {
|
||||||
if (m_type == t_mod)
|
if (m_type == t_mod)
|
||||||
return *this;
|
return *this;
|
||||||
rational D(abs(m_coeff));
|
rational D(abs(m_coeff));
|
||||||
|
if (D == 0)
|
||||||
|
D = 1;
|
||||||
for (auto const& [id, coeff] : m_vars)
|
for (auto const& [id, coeff] : m_vars)
|
||||||
if (coeff != 0)
|
if (coeff != 0)
|
||||||
D = lcm(D, abs(coeff));
|
D = lcm(D, abs(coeff));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue