summaryrefslogtreecommitdiff
path: root/src/div.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-12-20 01:53:52 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-12-20 01:53:52 +0000
commitcc75af695c121b993a7e61aa688ee5e121ce7718 (patch)
tree4fde17b9667a206b9432582f374ebcc221cd6543 /src/div.c
parentf187eb781735bff474be7300555d58ebb3720fd1 (diff)
parent365b869c65b4d62a0fd979f56881e098cc269eff (diff)
downloadmpfr-cc75af695c121b993a7e61aa688ee5e121ce7718.tar.gz
Replaced the 4.0 branch by a copy of the trunk (in order to keep the
history of the latest changes of the trunk); this replacement is due to a limitation of Subversion where a merge is regarded as a single commit, and is OK here since the 4.0 branch is new. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12024 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/div.c')
-rw-r--r--src/div.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/div.c b/src/div.c
index 3ef62b6d5..7d208621f 100644
--- a/src/div.c
+++ b/src/div.c
@@ -71,7 +71,8 @@ mpfr_div2_approx (mpfr_limb_ptr Q1, mpfr_limb_ptr Q0,
/* we ignore yy below, but first increment r0, to ensure we get a lower
approximation of the remainder */
- r0 += (yy != 0);
+ r0 += yy != 0;
+ r1 += r0 == 0 && yy != 0;
r0 = u0 - r0;
r1 = u1 - r1 - (r0 > u0);