Correct wrongly applied patch

This commit is contained in:
brgladman 2008-05-20 10:05:59 +00:00
parent f6ef7209a4
commit 071622828b
2 changed files with 10 additions and 3 deletions

View File

@ -974,11 +974,21 @@ __GMP_DECLSPEC extern gmp_randstate_t __gmp_rands;
fastest hardware currently (2003) would need 100 million years, which fastest hardware currently (2003) would need 100 million years, which
suggests that these limits are acceptable. */ suggests that these limits are acceptable. */
#if WANT_FFT #if WANT_FFT
#if HAVE_NATIVE_mpn_sublsh1_n
#define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 63) #define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 63)
#define MPN_TOOM3_SQR_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 */ #else /* WANT_FFT */
#if HAVE_NATIVE_mpn_sublsh1_n
#define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 255) #define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 255)
#define MPN_TOOM3_SQR_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 #define MPN_TOOM3_MAX_N 285405
#endif /* WANT_FFT */ #endif /* WANT_FFT */

View File

@ -56,9 +56,6 @@ mpz_set_d (mpz_ptr r, double d)
if (ALLOC(r) < rn) if (ALLOC(r) < rn)
_mpz_realloc (r, rn); _mpz_realloc (r, rn);
if (rn <= 0)
rn = 0;
rp = PTR (r); rp = PTR (r);
switch (rn) switch (rn)