mirror of
https://github.com/Z3Prover/z3
synced 2026-07-04 22:36:10 +00:00
micro tuning perfect square test
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c350ddf990
commit
573c2cb8f7
5 changed files with 77 additions and 7 deletions
|
|
@ -239,6 +239,14 @@ public:
|
|||
int64_t get_int64(mpz & a) const { const_cast<mpzzp_manager*>(this)->p_normalize(a); return m().get_int64(a); }
|
||||
double get_double(mpz & a) const { const_cast<mpzzp_manager*>(this)->p_normalize(a); return m().get_double(a); }
|
||||
void power(mpz const & a, unsigned k, mpz & b) {
|
||||
if (k == 1) {
|
||||
set(b, a);
|
||||
return;
|
||||
}
|
||||
if (k == 0) {
|
||||
set(b, 1);
|
||||
return;
|
||||
}
|
||||
SASSERT(is_p_normalized(a));
|
||||
unsigned mask = 1;
|
||||
mpz power;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue