3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

FPA API bugfixes

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
Christoph M. Wintersteiger 2015-01-11 18:29:12 +00:00
parent 4bd8e0f497
commit e0bc704106
4 changed files with 54 additions and 11 deletions

View file

@ -146,7 +146,24 @@ public:
bool sgn(mpf const & x) const { return x.sign; }
const mpz & sig(mpf const & x) const { return x.significand; }
mpz sig_normalized(mpf const & x) {
mpf t;
set(t, x);
unpack(t, true);
mpz r;
mpz_manager().set(r, t.significand);
del(t);
return r;
}
const mpf_exp_t & exp(mpf const & x) const { return x.exponent; }
mpf_exp_t exp_normalized(mpf const & x) {
mpf t;
set(t, x);
unpack(t, true);
mpf_exp_t r = t.exponent;
del(t);
return r;
}
bool is_nan(mpf const & x);
bool is_inf(mpf const & x);