summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2001-11-15 14:46:36 +0100
committertege <tege@gmplib.org>2001-11-15 14:46:36 +0100
commit0e2a11e76cda1d4b656c8a17bcce6023c410dee5 (patch)
tree6016be29a0f9367a500c3bb9c31f350b6094fad6 /tests
parentce23105c368147c64bf53e067300e747e22557a6 (diff)
downloadgmp-0e2a11e76cda1d4b656c8a17bcce6023c410dee5.tar.gz
(main): Undo previous change; instead use mpz_invert to detect undefined cases.
Diffstat (limited to 'tests')
-rw-r--r--tests/mpz/reuse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/mpz/reuse.c b/tests/mpz/reuse.c
index f850a91d2..d21bc78ed 100644
--- a/tests/mpz/reuse.c
+++ b/tests/mpz/reuse.c
@@ -456,7 +456,7 @@ main (int argc, char **argv)
/* Don't run mpz_powm for huge exponents or when undefined. */
if (mpz_sizeinbase (in2, 2) < 250 && mpz_sgn (in3) != 0
- && mpz_sgn (in2) >= 0)
+ && (mpz_sgn (in2) >= 0 || mpz_invert (t, in1, in3)))
{
mpz_powm (ref1, in1, in2, in3);