mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
disabled "hardware interpretation" of fp.min/fp.max because the unspecified, standard-compliant behaviour is cheap anyways.
This commit is contained in:
parent
b5279d1da8
commit
3e61ee2331
|
@ -1155,11 +1155,8 @@ expr_ref fpa2bv_converter::mk_min_unspecified(func_decl * f, expr * x, expr * y)
|
||||||
expr_ref res(m);
|
expr_ref res(m);
|
||||||
|
|
||||||
// The only cases in which min is unspecified for is when the arguments are +0.0 and -0.0.
|
// The only cases in which min is unspecified for is when the arguments are +0.0 and -0.0.
|
||||||
|
// There is no "hardware interpretation" for fp.min.
|
||||||
|
|
||||||
if (m_hi_fp_unspecified)
|
|
||||||
// The hardware interpretation is -0.0.
|
|
||||||
mk_nzero(f, res);
|
|
||||||
else {
|
|
||||||
std::pair<app*, app*> decls(0, 0);
|
std::pair<app*, app*> decls(0, 0);
|
||||||
if (!m_specials.find(f, decls)) {
|
if (!m_specials.find(f, decls)) {
|
||||||
decls.first = m.mk_fresh_const(0, m_bv_util.mk_sort(1));
|
decls.first = m.mk_fresh_const(0, m_bv_util.mk_sort(1));
|
||||||
|
@ -1185,7 +1182,6 @@ expr_ref fpa2bv_converter::mk_min_unspecified(func_decl * f, expr * x, expr * y)
|
||||||
mk_is_nzero(y, x_is_nzero);
|
mk_is_nzero(y, x_is_nzero);
|
||||||
m_simp.mk_and(x_is_pzero, x_is_nzero, xyzero);
|
m_simp.mk_and(x_is_pzero, x_is_nzero, xyzero);
|
||||||
mk_ite(xyzero, pn, np, res);
|
mk_ite(xyzero, pn, np, res);
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -1244,11 +1240,8 @@ expr_ref fpa2bv_converter::mk_max_unspecified(func_decl * f, expr * x, expr * y)
|
||||||
expr_ref res(m);
|
expr_ref res(m);
|
||||||
|
|
||||||
// The only cases in which max is unspecified for is when the arguments are +0.0 and -0.0.
|
// The only cases in which max is unspecified for is when the arguments are +0.0 and -0.0.
|
||||||
|
// There is no "hardware interpretation" for fp.max.
|
||||||
|
|
||||||
if (m_hi_fp_unspecified)
|
|
||||||
// The hardware interpretation is +0.0.
|
|
||||||
mk_pzero(f, res);
|
|
||||||
else {
|
|
||||||
std::pair<app*, app*> decls(0, 0);
|
std::pair<app*, app*> decls(0, 0);
|
||||||
if (!m_specials.find(f, decls)) {
|
if (!m_specials.find(f, decls)) {
|
||||||
decls.first = m.mk_fresh_const(0, m_bv_util.mk_sort(1));
|
decls.first = m.mk_fresh_const(0, m_bv_util.mk_sort(1));
|
||||||
|
@ -1274,7 +1267,6 @@ expr_ref fpa2bv_converter::mk_max_unspecified(func_decl * f, expr * x, expr * y)
|
||||||
mk_is_nzero(y, x_is_nzero);
|
mk_is_nzero(y, x_is_nzero);
|
||||||
m_simp.mk_and(x_is_pzero, x_is_nzero, xyzero);
|
m_simp.mk_and(x_is_pzero, x_is_nzero, xyzero);
|
||||||
mk_ite(xyzero, pn, np, res);
|
mk_ite(xyzero, pn, np, res);
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue