diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2011-03-19 17:20:45 +0100 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2011-03-19 17:20:45 +0100 |
commit | 684933256003c23e023cee6c70f9cfa089c5dd06 (patch) | |
tree | b491cd306142070c6d302378945f0cf446df73ea /mpz/fac_ui.c | |
parent | dd47c99507f8ff4a57b8a9c93dab07b69065745b (diff) | |
download | gmp-684933256003c23e023cee6c70f9cfa089c5dd06.tar.gz |
Use MPZ_REALLOC for standard, conditional reallocation.
Diffstat (limited to 'mpz/fac_ui.c')
-rw-r--r-- | mpz/fac_ui.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mpz/fac_ui.c b/mpz/fac_ui.c index 7e394fcb1..09e7ab4fb 100644 --- a/mpz/fac_ui.c +++ b/mpz/fac_ui.c @@ -145,14 +145,14 @@ mpz_fac_ui (mpz_ptr x, unsigned long n) if (n <= ((unsigned long) 1) << (APCONST)) { - mpz_realloc2 (x, 4 * z); + MPZ_REALLOC (x, 4 * z); ap_product_small (x, CNST_LIMB(2), CNST_LIMB(1), n - 1, 4L); return; } if (n <= ((unsigned long) 1) << (APCONST + 1)) { /* use n!=odd(1,n)*(n/2)!*2^(n/2) */ mpz_init2 (t1, 2 * z); - mpz_realloc2 (x, 4 * z); + MPZ_REALLOC (x, 4 * z); ap_product_small (x, CNST_LIMB(2), CNST_LIMB(1), n / 2 - 1, 4L); ap_product_small (t1, CNST_LIMB(3), CNST_LIMB(2), (n - 1) / 2, 4L); mpz_mul (x, x, t1); @@ -165,7 +165,7 @@ mpz_fac_ui (mpz_ptr x, unsigned long n) /* use n!=C_2(1,n/2)^2*C_2(n/2,n)*(n/4)!*2^(n/2+n/4) all int divs so need (BITS_IN_N-APCONST+1)=(APCONST+3-APCONST+1)=4 stack entries */ mpz_init2 (t1, 2 * z); - mpz_realloc2 (x, 4 * z); + MPZ_REALLOC (x, 4 * z); for (i = 0; i < 4; i++) { mpz_init2 (st[i], z); |