3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 12:28:44 +00:00

Bugfix for mpf sqrt.

Fixes #222.
This commit is contained in:
Christoph M. Wintersteiger 2015-09-21 20:56:07 +01:00
parent 0b15fc9402
commit 04266fccc9

View file

@ -990,6 +990,7 @@ void mpf_manager::sqrt(mpf_rounding_mode rm, mpf const & x, mpf & o) {
TRACE("mpf_dbg", tout << "dec'ed " << m_mpz_manager.to_string(o.significand) << std::endl;);
}
o.exponent = a.exponent() >> 1;
if (a.exponent() % 2 == 0) o.exponent--;
round(rm, o);
}