diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2009-06-01 16:08:58 +0200 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2009-06-01 16:08:58 +0200 |
commit | 7cc5e60453498546b5b2b0daa44a466f0aa3d3d6 (patch) | |
tree | bebd75150cbaecdbcfbd4ddec2fa92c32807efb0 /mpz/remove.c | |
parent | 6829ededece8512d917a548070bacd19eb351680 (diff) | |
download | gmp-7cc5e60453498546b5b2b0daa44a466f0aa3d3d6.tar.gz |
Correctly handle multiplicity that does not fit an int.
Diffstat (limited to 'mpz/remove.c')
-rw-r--r-- | mpz/remove.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mpz/remove.c b/mpz/remove.c index 1e5474bec..761d01ba8 100644 --- a/mpz/remove.c +++ b/mpz/remove.c @@ -23,7 +23,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ unsigned long int mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr f) { - mpz_t fpow[40]; /* inexhaustible...until year 2020 or so */ + mpz_t fpow[GMP_LIMB_BITS]; /* Really MP_SIZE_T_BITS */ mpz_t x, rem; unsigned long int pwr; int p; @@ -69,7 +69,7 @@ mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr f) mpz_set (dest, x); } - pwr = (1 << p) - 1; + pwr = (1L << p) - 1; mpz_clear (fpow[p]); |