mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 04:28:17 +00:00
Tentative fix for #586.
This commit is contained in:
parent
bb2c5972c7
commit
44b0a6ddbc
|
@ -1928,8 +1928,7 @@ void fpa2bv_converter::mk_round_to_integral(sort * s, expr_ref & rm, expr_ref &
|
|||
tie_pttrn = m_bv_util.mk_concat(one_1, m_bv_util.mk_numeral(0, sbits-1));
|
||||
m_simp.mk_eq(rem, tie_pttrn, tie2);
|
||||
div_last = m_bv_util.mk_extract(0, 0, div);
|
||||
tie2_c = m.mk_ite(tie2, m.mk_or(m.mk_and(rm_is_rte, m.mk_eq(div_last, one_1)),
|
||||
m.mk_and(rm_is_rta, m.mk_eq(div_last, zero_1))),
|
||||
tie2_c = m.mk_ite(tie2, m.mk_or(m.mk_and(rm_is_rte, m.mk_eq(div_last, one_1)), rm_is_rta),
|
||||
m_bv_util.mk_ule(tie_pttrn, rem));
|
||||
m_simp.mk_ite(tie2_c, div_p1, div, v51);
|
||||
|
||||
|
|
|
@ -1095,7 +1095,7 @@ void mpf_manager::round_to_integral(mpf_rounding_mode rm, mpf const & x, mpf & o
|
|||
TRACE("mpf_dbg", tout << "tie= " << tie << "; <tie = " << less_than_tie << "; >tie = " << more_than_tie << std::endl;);
|
||||
if (tie) {
|
||||
if ((rm == MPF_ROUND_NEAREST_TEVEN && m_mpz_manager.is_odd(div)) ||
|
||||
(rm == MPF_ROUND_NEAREST_TAWAY && m_mpz_manager.is_even(div))) {
|
||||
(rm == MPF_ROUND_NEAREST_TAWAY)) {
|
||||
TRACE("mpf_dbg", tout << "div++ (1)" << std::endl;);
|
||||
m_mpz_manager.inc(div);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue