3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00

refine precision before taking closest integral value.

This commit is contained in:
Nikolaj Bjorner 2024-04-30 16:58:22 -07:00
parent 2ad9f220f2
commit bc577b93ae

View file

@ -2599,6 +2599,7 @@ namespace algebraic_numbers {
qm().dec(v);
}
else {
refine_until_prec(const_cast<numeral&>(a), 1);
bqm().floor(qm(), lower(a.to_algebraic()), v);
}
m_wrapper.set(b, v);
@ -2611,6 +2612,7 @@ namespace algebraic_numbers {
qm().inc(v);
}
else {
refine_until_prec(const_cast<numeral&>(a), 1);
bqm().ceil(qm(), upper(a.to_algebraic()), v);
}
m_wrapper.set(b, v);