3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 20:38:43 +00:00

check zero

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2022-05-11 10:13:07 -07:00
parent 860d904699
commit 5aec9b32bd

View file

@ -489,6 +489,8 @@ namespace opt {
if (m_type == t_mod)
return *this;
rational D(abs(m_coeff));
if (D == 0)
D = 1;
for (auto const& [id, coeff] : m_vars)
if (coeff != 0)
D = lcm(D, abs(coeff));