summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2009-01-14 16:37:26 +0100
committerTorbjorn Granlund <tege@gmplib.org>2009-01-14 16:37:26 +0100
commit533a32727bef4785ac6db4c042ecd1cedc8eb4f9 (patch)
tree92c759bb7ecf3d9a6842d05e5f3bbcc9c5ac8175
parentd672b317c324f6f15443e8d03375608298b4f16f (diff)
downloadgmp-533a32727bef4785ac6db4c042ecd1cedc8eb4f9.tar.gz
(mpn_mod_1): Properly check for normalization divisor.
-rw-r--r--mpn/generic/mod_1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpn/generic/mod_1.c b/mpn/generic/mod_1.c
index 3856a3f30..28d76a572 100644
--- a/mpn/generic/mod_1.c
+++ b/mpn/generic/mod_1.c
@@ -209,7 +209,7 @@ mpn_mod_1 (mp_srcptr ap, mp_size_t n, mp_limb_t b)
if (n == 0)
return 0;
- if (UNLIKELY (b >= GMP_NUMB_MASK / 2))
+ if (UNLIKELY ((b & GMP_NUMB_HIGHBIT) != 0))
{
/* The functions below do not handle this large divisor. */
return mpn_mod_1_norm (ap, n, b);