summaryrefslogtreecommitdiff
path: root/src/sub1sp.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2016-07-29 12:21:15 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2016-07-29 12:21:15 +0000
commit7db9ad0ae2aff26942af87c259379d95c40ce908 (patch)
treeaece45bdc6d8f50fdf1e772bed8bdb8bbe5a3e1d /src/sub1sp.c
parenta54d8623495ee30055c71803e6dccf72d2e4718a (diff)
downloadmpfr-7db9ad0ae2aff26942af87c259379d95c40ce908.tar.gz
[src/sub1sp.c] another code simplification
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10694 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/sub1sp.c')
-rw-r--r--src/sub1sp.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/sub1sp.c b/src/sub1sp.c
index 46a223625..be6913c4f 100644
--- a/src/sub1sp.c
+++ b/src/sub1sp.c
@@ -196,21 +196,7 @@ mpfr_sub1sp1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode,
d = (mpfr_uexp_t) bx - cx;
sh = GMP_NUMB_BITS - p;
mask = MPFR_LIMB_MASK(sh);
- if (d <= sh)
- {
- /* we can shift c by d bits to the right without losing any bit */
- MPFR_ASSERTD((cp[0] << (GMP_NUMB_BITS - d)) == 0);
- ap[0] = bp[0] - (cp[0] >> d);
- count_leading_zeros (cnt, ap[0]);
- ap[0] <<= cnt;
- bx -= cnt;
- /* sh > 0 since p < GMP_NUMB_BITS */
- MPFR_ASSERTD(sh > 0);
- rb = ap[0] & (MPFR_LIMB_ONE << (sh - 1));
- sb = (ap[0] & mask) ^ rb;
- ap[0] = ap[0] & ~mask;
- }
- else if (d < GMP_NUMB_BITS)
+ if (d < GMP_NUMB_BITS)
{
sb = cp[0] << (GMP_NUMB_BITS - d); /* neglected part of c */
ap[0] = bp[0] - (cp[0] >> d);