mirror of
https://github.com/Z3Prover/z3
synced 2025-07-03 11:25:40 +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
2 changed files with 5 additions and 5 deletions
|
@ -227,7 +227,7 @@ br_status float_rewriter::mk_abs(expr * arg1, expr_ref & result) {
|
||||||
return BR_DONE;
|
return BR_DONE;
|
||||||
}
|
}
|
||||||
sort * s = m().get_sort(arg1);
|
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),
|
m_util.mk_uminus(arg1),
|
||||||
arg1);
|
arg1);
|
||||||
return BR_REWRITE2;
|
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);
|
expr_ref h_p(m), l_p(m), rbits(m);
|
||||||
h_p = m_bv_util.mk_extract(2*sbits-1, sbits, product);
|
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) {
|
if (sbits >= 4) {
|
||||||
expr_ref sticky(m);
|
expr_ref sticky(m);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue