diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-05-11 01:31:49 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-05-11 01:31:49 +0200 |
commit | 55fa9146f9fb7b39880476616f84dbc603fb105f (patch) | |
tree | 49361adc57674d9388e72b4d61bf936a5929a4b3 /mpf/div.c | |
parent | d1d3af5b9a51de765d4dcc0ee9eac49ac98e47fb (diff) | |
download | gmp-55fa9146f9fb7b39880476616f84dbc603fb105f.tar.gz |
* mpn/generic/tdiv_qr.c, mpq/get_d.c, mpf/div.c, mpf/set_q.c,
mpf/set_str.c, mpf/ui_div.c: Test for high bit set, not for
count_leading_zeros zero.
Diffstat (limited to 'mpf/div.c')
-rw-r--r-- | mpf/div.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -32,7 +32,6 @@ mpf_div (mpf_ptr r, mpf_srcptr u, mpf_srcptr v) mp_size_t rsize, tsize; mp_size_t sign_quotient; mp_size_t prec; - unsigned normalization_steps; mp_limb_t q_limb; mp_exp_t rexp; TMP_DECL (marker); @@ -82,13 +81,15 @@ mpf_div (mpf_ptr r, mpf_srcptr u, mpf_srcptr v) rtp = tp + (tsize - usize); } - count_leading_zeros (normalization_steps, vp[vsize - 1]); /* Normalize the divisor and the dividend. */ - if (normalization_steps != 0) + if (! (vp[vsize-1] & MP_LIMB_T_HIGHBIT)) { mp_ptr tmp; mp_limb_t nlimb; + unsigned normalization_steps; + + count_leading_zeros (normalization_steps, vp[vsize - 1]); /* Shift up the divisor setting the most significant bit of the most significant limb. Use temporary storage not to clobber |