From 26d1435e00d5ea89288c946cb1ccfeab4e1f729a Mon Sep 17 00:00:00 2001 From: tege Date: Thu, 9 May 2002 00:51:04 +0200 Subject: Don't allocate extra limb for root value. --- mpz/root.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mpz/root.c b/mpz/root.c index 677ac5bad..87c921ebd 100644 --- a/mpz/root.c +++ b/mpz/root.c @@ -69,12 +69,12 @@ mpz_root (mpz_ptr r, mpz_srcptr u, unsigned long int nth) if (r != NULL) { - rootp = MPZ_REALLOC (r, rootn + 1); + rootp = MPZ_REALLOC (r, rootn); up = PTR(u); } else { - rootp = __GMP_ALLOCATE_FUNC_LIMBS (rootn + 1); + rootp = __GMP_ALLOCATE_FUNC_LIMBS (rootn); } if (nth == 1) @@ -90,7 +90,7 @@ mpz_root (mpz_ptr r, mpz_srcptr u, unsigned long int nth) if (r != NULL) SIZ(r) = us >= 0 ? rootn : -rootn; else - __GMP_FREE_FUNC_LIMBS (rootp, rootn + 1); + __GMP_FREE_FUNC_LIMBS (rootp, rootn); return exact; } -- cgit v1.2.1