mirror of
https://github.com/Z3Prover/z3
synced 2025-10-01 21:49:29 +00:00
put back shortcut for square test. Remove assumption in unit test
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
8158a500d4
commit
84bf34266b
2 changed files with 25 additions and 27 deletions
|
@ -2320,13 +2320,11 @@ bool mpz_manager<SYNCH>::is_perfect_square(mpz const & a, mpz & root) {
|
|||
set(root, 1);
|
||||
return true;
|
||||
}
|
||||
#if 0
|
||||
// current contract is that root is set to an approximation within +1/-1 of actional root.
|
||||
// x^2 mod 16 in { 9, 1, 4, 0 }
|
||||
auto mod16 = get_least_significant(a) & 0xF;
|
||||
if (mod16 != 0 && mod16 != 1 && mod16 != 4 && mod16 != 9)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
mpz lo, hi, mid, sq_lo, sq_mid;
|
||||
set(lo, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue