diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-05-26 16:20:49 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-05-26 16:20:49 +0000 |
commit | 6e2638de014ba01440353f77996ae0a10d5c8e8a (patch) | |
tree | 0597864b4d038dad3a811f122fc701d3ca6ed99e /sub.c | |
parent | b82a1ef2757619e4d20f4ff5f3fd6ace150e6f79 (diff) | |
download | mpfr-6e2638de014ba01440353f77996ae0a10d5c8e8a.tar.gz |
more changes
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@584 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sub.c')
-rw-r--r-- | sub.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -331,13 +331,13 @@ mpfr_sub1(a, b, c, rnd_mode, diff_exp) kc--; cc -= mpn_sub_1(&c2, bp+(--k), 1, (cp[kc]>>dif) + (cp[kc+1]<<(mp_bits_per_limb-dif))); - if (cc==0 || cc==-1) cc=c2; + if (cc==0 || (~cc==0 && ~c2==0)) cc=c2; } - if ((cc==0 || cc==-1) && kc==0) { + if ((cc==0 || (~cc==0)) && kc==0) { /* it still remains cp[0]<<(mp_bits_per_limb-dif) */ if (k!=0) cc -= mpn_sub_1(&c2, bp+(--k), 1, cp[0]<<(mp_bits_per_limb-dif)); - else cc -= cp[0]<<(mp_bits_per_limb-dif); + else if (cp[0]<<(mp_bits_per_limb-dif)) cc--; } if ((long)cc>0) goto add_one_ulp; else if ((long)cc<-1) goto end_of_sub; /* carry can be at most 1 */ |