3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00

Added missing float conversion in fpa2bv converter. Relates to #1178.

This commit is contained in:
Christoph M. Wintersteiger 2017-07-31 22:12:15 +01:00
parent bbf0ebcb74
commit 9601761a6f

View file

@ -2714,13 +2714,21 @@ void fpa2bv_converter::mk_to_fp_real_int(func_decl * f, unsigned num, expr * con
SASSERT(m_util.is_bv2rm(args[0]));
expr * bv_rm = to_app(args[0])->get_arg(0);
rational q;
if (!m_arith_util.is_numeral(args[1], q))
UNREACHABLE();
SASSERT((m_arith_util.is_int(args[1]) && m_arith_util.is_real(args[2])) ||
(m_arith_util.is_real(args[1]) && m_arith_util.is_int(args[2])));
rational e;
if (!m_arith_util.is_numeral(args[2], e))
UNREACHABLE();
rational q, e;
if (m_arith_util.is_int(args[1]) && m_arith_util.is_real(args[2])) {
if (!m_arith_util.is_numeral(args[1], e) ||
!m_arith_util.is_numeral(args[2], q))
UNREACHABLE();
}
else {
if (!m_arith_util.is_numeral(args[2], e) ||
!m_arith_util.is_numeral(args[1], q))
UNREACHABLE();
}
SASSERT(e.is_int64());
SASSERT(m_mpz_manager.eq(e.to_mpq().denominator(), 1));