mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 21:38:44 +00:00
FPA: bugfixes in mul() and abs()
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
bdc675b1df
commit
e5307300de
|
@ -227,7 +227,7 @@ br_status float_rewriter::mk_abs(expr * arg1, expr_ref & result) {
|
|||
return BR_DONE;
|
||||
}
|
||||
sort * s = m().get_sort(arg1);
|
||||
result = m().mk_ite(m_util.mk_lt(arg1, m_util.mk_pzero(s)),
|
||||
result = m().mk_ite(m_util.mk_is_sign_minus(arg1),
|
||||
m_util.mk_uminus(arg1),
|
||||
arg1);
|
||||
return BR_REWRITE2;
|
||||
|
|
|
@ -610,7 +610,7 @@ void fpa2bv_converter::mk_mul(func_decl * f, unsigned num, expr * const * args,
|
|||
|
||||
expr_ref h_p(m), l_p(m), rbits(m);
|
||||
h_p = m_bv_util.mk_extract(2*sbits-1, sbits, product);
|
||||
l_p = m_bv_util.mk_extract(2*sbits-1, sbits, product);
|
||||
l_p = m_bv_util.mk_extract(sbits-1, 0, product);
|
||||
|
||||
if (sbits >= 4) {
|
||||
expr_ref sticky(m);
|
||||
|
@ -2098,7 +2098,7 @@ void fpa2bv_converter::round(sort * s, expr_ref & rm, expr_ref & sgn, expr_ref &
|
|||
not_lors = m_bv_util.mk_bv_not(last_or_sticky);
|
||||
not_rors = m_bv_util.mk_bv_not(round_or_sticky);
|
||||
not_sgn = m_bv_util.mk_bv_not(sgn);
|
||||
expr * round_lors[2] = { not_round, not_lors };
|
||||
expr * round_lors[2] = { not_round, not_lors};
|
||||
expr * pos_args[2] = { sgn, not_rors };
|
||||
expr * neg_args[2] = { not_sgn, not_rors };
|
||||
|
||||
|
|
Loading…
Reference in a new issue