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:11:17 -07:00
parent 361155685c
commit 860d904699

View file

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