mirror of
https://github.com/Z3Prover/z3
synced 2026-01-23 02:24:01 +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
|
|
@ -281,6 +281,14 @@ void mpq_manager<SYNCH>::set(mpq & a, char const * val) {
|
|||
|
||||
template<bool SYNCH>
|
||||
void mpq_manager<SYNCH>::power(mpq const & a, unsigned p, mpq & b) {
|
||||
if (p == 1) {
|
||||
set(b, a);
|
||||
return;
|
||||
}
|
||||
if (p == 0) {
|
||||
set(b, 1);
|
||||
return;
|
||||
}
|
||||
unsigned mask = 1;
|
||||
mpq power;
|
||||
set(power, a);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue