summaryrefslogtreecommitdiff
path: root/mpf/div.c
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2002-05-06 15:05:24 +0200
committertege <tege@gmplib.org>2002-05-06 15:05:24 +0200
commit0e6c3fe79785bac780c57613a11a333ec6649453 (patch)
tree16e8ee3cca8e35f57f42e78aebd8ad08ad039997 /mpf/div.c
parent9a2cd598e3e9ea6f035ddc74e4c0bbc91542c459 (diff)
downloadgmp-0e6c3fe79785bac780c57613a11a333ec6649453.tar.gz
Nailify.
Diffstat (limited to 'mpf/div.c')
-rw-r--r--mpf/div.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mpf/div.c b/mpf/div.c
index c8ce73442..0f298a554 100644
--- a/mpf/div.c
+++ b/mpf/div.c
@@ -83,13 +83,14 @@ mpf_div (mpf_ptr r, mpf_srcptr u, mpf_srcptr v)
/* Normalize the divisor and the dividend. */
- if (! (vp[vsize-1] & MP_LIMB_T_HIGHBIT))
+ if ((vp[vsize-1] & GMP_NUMB_HIGHBIT) == 0)
{
mp_ptr tmp;
mp_limb_t nlimb;
unsigned normalization_steps;
count_leading_zeros (normalization_steps, vp[vsize - 1]);
+ normalization_steps -= GMP_NAIL_BITS;
/* Shift up the divisor setting the most significant bit of
the most significant limb. Use temporary storage not to clobber