diff options
author | tege <tege@gmplib.org> | 2002-04-23 12:25:52 +0200 |
---|---|---|
committer | tege <tege@gmplib.org> | 2002-04-23 12:25:52 +0200 |
commit | 6481760fe9fc81823c4b67744b2682ab276d66b0 (patch) | |
tree | a441191df17e23c35a60def35b16e465f5ebc4a2 | |
parent | d852e3ed4f495aa3f5baeda88dd5c84ae5b66350 (diff) | |
download | gmp-6481760fe9fc81823c4b67744b2682ab276d66b0.tar.gz |
Rework nails code.
-rw-r--r-- | mpz/fits_s.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mpz/fits_s.h b/mpz/fits_s.h index 7dd664016..4d8e18723 100644 --- a/mpz/fits_s.h +++ b/mpz/fits_s.h @@ -32,9 +32,9 @@ FUNCTION (mpz_srcptr z) return (n == 0 || (n == 1 && p[0] <= MAXIMUM) || (n == -1 && p[0] <= - (mp_limb_t) MINIMUM) -#if GMP_NAIL_BITS != 0 - || (n == 2 && (p[0] + (p[1] << GMP_NUMB_BITS)) <= MAXIMUM) - || (n == -2 && (p[0] + (p[1] << GMP_NUMB_BITS)) <= - (mp_limb_t) MINIMUM) +#if GMP_NAIL_BITS != 0 /* too broad, better compare MAXIMUM to GMP_NUMB_MAX */ + || (n == 2 && p[1] <= (MAXIMUM >> GMP_NUMB_BITS)) + || (n == -2 && p[1] <= (- (mp_limb_t) MINIMUM) >> GMP_NUMB_BITS) #endif ); } |