summaryrefslogtreecommitdiff
path: root/mpz/fac_ui.c
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2011-03-19 17:20:45 +0100
committerTorbjorn Granlund <tege@gmplib.org>2011-03-19 17:20:45 +0100
commit684933256003c23e023cee6c70f9cfa089c5dd06 (patch)
treeb491cd306142070c6d302378945f0cf446df73ea /mpz/fac_ui.c
parentdd47c99507f8ff4a57b8a9c93dab07b69065745b (diff)
downloadgmp-684933256003c23e023cee6c70f9cfa089c5dd06.tar.gz
Use MPZ_REALLOC for standard, conditional reallocation.
Diffstat (limited to 'mpz/fac_ui.c')
-rw-r--r--mpz/fac_ui.c6
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);