diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-05-17 14:08:40 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-05-17 14:08:40 +0000 |
commit | 6fb90863ee97e291b6d1041f28057d7adcc0b942 (patch) | |
tree | 5b5e73aafdad8250fcf08427d6ccb583686fae08 | |
parent | bf8d4cc57a8d0b33ec06062dd3bc64c0cc7f5c21 (diff) | |
download | mpfr-6fb90863ee97e291b6d1041f28057d7adcc0b942.tar.gz |
[src/cmp2.c] Added/updated comments.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11488 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | src/cmp2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmp2.c b/src/cmp2.c index 4f5c16a0d..7b58859c7 100644 --- a/src/cmp2.c +++ b/src/cmp2.c @@ -85,9 +85,11 @@ mpfr_cmp2 (mpfr_srcptr b, mpfr_srcptr c, mpfr_prec_t *cancel) if (MPFR_LIKELY (cn < 0)) /* |b| = |c| */ return 0; + /* b has been read entirely, but not c. Replace b by c for the + symmetric case below (only the sign differs if not 0). */ bp = cp; bn = cn; - cn = -1; + cn = -1; /* to enter the following "if" */ sign = -1; } @@ -145,7 +147,7 @@ mpfr_cmp2 (mpfr_srcptr b, mpfr_srcptr c, mpfr_prec_t *cancel) if (MPFR_LIKELY (diff_exp < GMP_NUMB_BITS)) { cc = cp[cn] >> diff_exp; - /* warning: a shift by GMP_NUMB_BITS may give wrong results */ + /* warning: a shift by GMP_NUMB_BITS is not allowed by ISO C */ if (diff_exp) lastc = cp[cn] << (GMP_NUMB_BITS - diff_exp); cn--; |