diff options
author | tege <tege@gmplib.org> | 2002-04-21 04:16:47 +0200 |
---|---|---|
committer | tege <tege@gmplib.org> | 2002-04-21 04:16:47 +0200 |
commit | 5c24f7f490b8875bc5f9c62002eb6002da849080 (patch) | |
tree | 8ad86250a823c2d4da33795650488856086335bd /mpz/aorsmul_i.c | |
parent | c8e8f84a23071f526e6d727c39936e2a0bd2c682 (diff) | |
download | gmp-5c24f7f490b8875bc5f9c62002eb6002da849080.tar.gz |
Nailify better.
Diffstat (limited to 'mpz/aorsmul_i.c')
-rw-r--r-- | mpz/aorsmul_i.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mpz/aorsmul_i.c b/mpz/aorsmul_i.c index bc6993147..f97ca226c 100644 --- a/mpz/aorsmul_i.c +++ b/mpz/aorsmul_i.c @@ -196,7 +196,7 @@ mpz_addmul_ui (mpz_ptr w, mpz_srcptr x, unsigned long y) { mpz_aorsmul_1 (w, x, (mp_limb_t) y & GMP_NUMB_MASK, (mp_size_t) 0); #if GMP_NAIL_BITS != 0 - if (y > GMP_NUMB_MAX) + if (y > GMP_NUMB_MAX && SIZ(x) != 0) { mpz_t t; mp_ptr tp; @@ -218,9 +218,9 @@ mpz_addmul_ui (mpz_ptr w, mpz_srcptr x, unsigned long y) void mpz_submul_ui (mpz_ptr w, mpz_srcptr x, unsigned long y) { - mpz_aorsmul_1 (w, x, (mp_limb_t) y, (mp_size_t) -1); + mpz_aorsmul_1 (w, x, (mp_limb_t) y & GMP_NUMB_MASK, (mp_size_t) -1); #if GMP_NAIL_BITS != 0 - if (y > GMP_NUMB_MAX) + if (y > GMP_NUMB_MAX && SIZ(x) != 0) { mpz_t t; mp_ptr tp; |