diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2012-03-19 22:34:06 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2012-03-19 22:34:06 +0100 |
commit | b038e23b7977bf93fca48adb934b996cdc42198d (patch) | |
tree | 8cd7a15538aec30cfffeae18ec139323732d8544 /mpz/oddfac_1.c | |
parent | 09453ef959d2bac37307c73802c90bf79f45e496 (diff) | |
download | gmp-b038e23b7977bf93fca48adb934b996cdc42198d.tar.gz |
mpz/oddfac_1.c: Improve ASSERTs.
Diffstat (limited to 'mpz/oddfac_1.c')
-rw-r--r-- | mpz/oddfac_1.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mpz/oddfac_1.c b/mpz/oddfac_1.c index c367b880a..5e9268a52 100644 --- a/mpz/oddfac_1.c +++ b/mpz/oddfac_1.c @@ -499,7 +499,7 @@ mpz_oddfac_1 (mpz_ptr x, mp_limb_t n, unsigned flag) { static const mp_limb_t tablef[] = { ONE_LIMB_ODD_FACTORIAL_TABLE }; - ASSERT (flag == 0 || (n >= numberof (tablef) && ABOVE_THRESHOLD (n, FAC_DSC_THRESHOLD))); + ASSERT (flag == 0 || (flag == 1 && n >= numberof (tablef) && ABOVE_THRESHOLD (n, FAC_DSC_THRESHOLD))); if (n < numberof (tablef)) { @@ -594,7 +594,6 @@ mpz_oddfac_1 (mpz_ptr x, mp_limb_t n, unsigned flag) MPZ_TMP_INIT (mswing, size); /* Put the sieve on the second half, it will be overwritten by the last mswing. */ sieve = PTR (mswing) + size / 2 + 1; - ASSERT ((SIZ (mswing) = 0) || ALLOC (mswing) == size); size = (bitwise_primesieve (sieve, n - 1) + 1) / log_n_max (n) + 1; |