3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-04 06:16:09 +00:00

Shared features from polysat branch (#6567)

* Allow setting default debug action

* Fix dlist and add iterator

* Add var_queue iterator

* Add some helpers

* rational: machine_div2k and pseudo_inverse

* Basic support for non-copyable types in map

* tbv helpers

* pdd updates

* Remove duplicate functions

gcc doesn't like having both versions
This commit is contained in:
Jakob Rath 2023-02-03 22:08:47 +01:00 committed by GitHub
parent be44ace995
commit d69155b9e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 456 additions and 62 deletions

View file

@ -487,6 +487,8 @@ public:
void machine_div_rem(mpz const & a, mpz const & b, mpz & c, mpz & d) { mpz_manager<SYNCH>::machine_div_rem(a, b, c, d); }
void machine_div2k(mpz const & a, unsigned k, mpz & c) { mpz_manager<SYNCH>::machine_div2k(a, k, c); }
void div(mpz const & a, mpz const & b, mpz & c) { mpz_manager<SYNCH>::div(a, b, c); }
void rat_div(mpz const & a, mpz const & b, mpq & c) {
@ -513,6 +515,12 @@ public:
machine_div(a.m_num, b.m_num, c);
}
void machine_idiv2k(mpq const & a, unsigned k, mpq & c) {
SASSERT(is_int(a));
machine_div2k(a.m_num, k, c.m_num);
reset_denominator(c);
}
void idiv(mpq const & a, mpq const & b, mpq & c) {
SASSERT(is_int(a) && is_int(b));
div(a.m_num, b.m_num, c.m_num);