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

pull unstable

Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
This commit is contained in:
Nikolaj Bjorner 2015-04-01 14:57:11 -07:00
commit 52619b9dbb
337 changed files with 24943 additions and 30606 deletions

View file

@ -75,7 +75,7 @@ public:
void set(mpf & o, unsigned ebits, unsigned sbits, mpf_rounding_mode rm, mpq const & value);
void set(mpf & o, unsigned ebits, unsigned sbits, mpf_rounding_mode rm, char const * value);
void set(mpf & o, unsigned ebits, unsigned sbits, mpf_rounding_mode rm, mpq const & significand, mpz const & exponent);
void set(mpf & o, unsigned ebits, unsigned sbits, bool sign, uint64 significand, int exponent);
void set(mpf & o, unsigned ebits, unsigned sbits, bool sign, uint64 significand, mpf_exp_t exponent);
void set(mpf & o, unsigned ebits, unsigned sbits, bool sign, mpz const & significand, mpf_exp_t exponent);
void set(mpf & o, mpf const & x);
void set(mpf & o, unsigned ebits, unsigned sbits, mpf_rounding_mode rm, mpf const & x);
@ -146,7 +146,22 @@ public:
bool sgn(mpf const & x) const { return x.sign; }
const mpz & sig(mpf const & x) const { return x.significand; }
void sig_normalized(mpf const & x, mpz & res) {
mpf t;
set(t, x);
unpack(t, true);
mpz_manager().set(res, t.significand);
del(t);
}
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);
@ -191,6 +206,8 @@ public:
*/
unsigned prev_power_of_two(mpf const & a);
void to_sbv_mpq(mpf_rounding_mode rm, const mpf & x, scoped_mpq & o);
protected:
bool has_bot_exp(mpf const & x);
bool has_top_exp(mpf const & x);
@ -203,8 +220,8 @@ protected:
void mk_round_inf(mpf_rounding_mode rm, mpf & o);
// Convert x into a mpz numeral. zm is the manager that owns o.
void to_mpz(mpf const & x, unsynch_mpz_manager & zm, mpz & o);
void to_mpz(mpf const & x, scoped_mpz & o) { to_mpz(x, o.m(), o); }
void to_mpz(mpf const & x, unsynch_mpz_manager & zm, mpz & o);
void to_mpz(mpf const & x, scoped_mpz & o) { to_mpz(x, o.m(), o); }
class powers2 {
unsynch_mpz_manager & m;