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

ensure abs

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2022-05-11 09:09:00 -07:00
parent cbaa16df57
commit 361155685c

View file

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