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

Changed FP significand/exponent functions to return non-normalized results. Clarified function remarks. Relates to #383.

This commit is contained in:
Christoph M. Wintersteiger 2016-01-13 16:32:32 +00:00
parent e0f873c732
commit 357ec9e7d1
3 changed files with 39 additions and 22 deletions

View file

@ -155,12 +155,16 @@ public:
}
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;
if (is_zero(x))
return 0;
else {
mpf t;
set(t, x);
unpack(t, true);
mpf_exp_t r = t.exponent;
del(t);
return r;
}
}
bool is_nan(mpf const & x);