From 071622828b063aca7c5a893d64d3a90f97aa906b Mon Sep 17 00:00:00 2001 From: brgladman Date: Tue, 20 May 2008 10:05:59 +0000 Subject: [PATCH] Correct wrongly applied patch --- gmp-impl.h | 10 ++++++++++ mpz/set_d.c | 3 --- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gmp-impl.h b/gmp-impl.h index e91e18cb..240c705e 100644 --- a/gmp-impl.h +++ b/gmp-impl.h @@ -974,11 +974,21 @@ __GMP_DECLSPEC extern gmp_randstate_t __gmp_rands; fastest hardware currently (2003) would need 100 million years, which suggests that these limits are acceptable. */ #if WANT_FFT +#if HAVE_NATIVE_mpn_sublsh1_n #define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 63) #define MPN_TOOM3_SQR_N_TSIZE(n) (2*(n) + 63) +#else +#define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 2*(n/3) + 63) +#define MPN_TOOM3_SQR_N_TSIZE(n) (2*(n) + 2*(n/3) + 63) +#endif #else /* WANT_FFT */ +#if HAVE_NATIVE_mpn_sublsh1_n #define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 255) #define MPN_TOOM3_SQR_N_TSIZE(n) (2*(n) + 255) +#else +#define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 2*(n/3) + 255) +#define MPN_TOOM3_SQR_N_TSIZE(n) (2*(n) + 2*(n/3) + 255) +#endif #define MPN_TOOM3_MAX_N 285405 #endif /* WANT_FFT */ diff --git a/mpz/set_d.c b/mpz/set_d.c index d14cf00b..8f5169eb 100644 --- a/mpz/set_d.c +++ b/mpz/set_d.c @@ -56,9 +56,6 @@ mpz_set_d (mpz_ptr r, double d) if (ALLOC(r) < rn) _mpz_realloc (r, rn); - if (rn <= 0) - rn = 0; - rp = PTR (r); switch (rn)