3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-03 22:05:45 +00:00

Remove int64, uint64 typedefs in favor of int64_t / uint64_t.

This commit is contained in:
Bruce Mitchener 2018-03-31 14:45:04 +07:00
parent 16a2ad9afd
commit 2fa304d8de
80 changed files with 437 additions and 449 deletions

View file

@ -115,11 +115,11 @@ void mpf_manager::set(mpf & o, unsigned ebits, unsigned sbits, double value) {
// double === mpf(11, 53)
static_assert(sizeof(double) == 8, "doubles are 8 bytes");
uint64 raw;
uint64_t raw;
memcpy(&raw, &value, sizeof(double));
bool sign = (raw >> 63) != 0;
int64 e = ((raw & 0x7FF0000000000000ull) >> 52) - 1023;
uint64 s = raw & 0x000FFFFFFFFFFFFFull;
int64_t e = ((raw & 0x7FF0000000000000ull) >> 52) - 1023;
uint64_t s = raw & 0x000FFFFFFFFFFFFFull;
TRACE("mpf_dbg", tout << "set: " << value << " is: raw=" << raw << " (double)" <<
" sign=" << sign << " s=" << s << " e=" << e << std::endl;);
@ -300,7 +300,7 @@ void mpf_manager::set(mpf & o, unsigned ebits, unsigned sbits, mpf_rounding_mode
TRACE("mpf_dbg", tout << "set: res = " << to_string(o) << std::endl;);
}
void mpf_manager::set(mpf & o, unsigned ebits, unsigned sbits, bool sign, mpf_exp_t exponent, uint64 significand) {
void mpf_manager::set(mpf & o, unsigned ebits, unsigned sbits, bool sign, mpf_exp_t exponent, uint64_t significand) {
// Assumption: this represents (sign * -1) * (significand/2^sbits) * 2^exponent.
o.ebits = ebits;
o.sbits = sbits;
@ -1711,8 +1711,8 @@ void mpf_manager::to_rational(mpf const & x, unsynch_mpq_manager & qm, mpq & o)
double mpf_manager::to_double(mpf const & x) {
SASSERT(x.ebits <= 11 && x.sbits <= 53);
uint64 raw = 0;
int64 sig = 0, exp = 0;
uint64_t raw = 0;
int64_t sig = 0, exp = 0;
sig = m_mpz_manager.get_uint64(x.significand);
sig <<= 53 - x.sbits;
@ -1741,7 +1741,7 @@ float mpf_manager::to_float(mpf const & x) {
unsigned int raw = 0;
unsigned int sig = 0, exp = 0;
uint64 q = m_mpz_manager.get_uint64(x.significand);
uint64_t q = m_mpz_manager.get_uint64(x.significand);
SASSERT(q < 4294967296ull);
sig = q & 0x00000000FFFFFFFF;
sig <<= 24 - x.sbits;
@ -1751,7 +1751,7 @@ float mpf_manager::to_float(mpf const & x) {
else if (has_bot_exp(x))
exp = -127;
else {
int64 q = x.exponent;
int64_t q = x.exponent;
SASSERT(q < 4294967296ll);
exp = q & 0x00000000FFFFFFFF;
}