mirror of
https://github.com/Z3Prover/z3
synced 2025-07-23 04:38:53 +00:00
FPA: bugfixes, leakfixes, added fp.to_real
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
d6ac98a494
commit
b30e61e528
7 changed files with 177 additions and 62 deletions
|
@ -552,5 +552,14 @@ br_status float_rewriter::mk_to_sbv(expr * arg1, expr * arg2, expr_ref & result)
|
|||
}
|
||||
|
||||
br_status float_rewriter::mk_to_real(expr * arg1, expr_ref & result) {
|
||||
scoped_mpf fv(m_util.fm());
|
||||
|
||||
if (m_util.is_value(arg1, fv)) {
|
||||
scoped_mpq r(m_fm.mpq_manager());
|
||||
m_fm.to_rational(fv, r);
|
||||
result = m_util.au().mk_numeral(r.get(), false);
|
||||
return BR_DONE;
|
||||
}
|
||||
|
||||
return BR_FAILED;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue