summaryrefslogtreecommitdiff
path: root/mpfr
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2002-04-16 23:29:05 +0200
committerKevin Ryde <user42@zip.com.au>2002-04-16 23:29:05 +0200
commitb86fb9fcd8c171a164fb51425503ce37fa9d4b38 (patch)
tree2fe1bd7072221702aa498c9599a61ea93ee8a48c /mpfr
parent81b7a3df961f9ceeb95f57fbb6b41e9b2ad8f323 (diff)
downloadgmp-b86fb9fcd8c171a164fb51425503ce37fa9d4b38.tar.gz
* mpfr/cmp_ui.c (mpfr_cmp_si_2exp): Fix b==0 i!=0 case.
Diffstat (limited to 'mpfr')
-rw-r--r--mpfr/cmp_ui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpfr/cmp_ui.c b/mpfr/cmp_ui.c
index 82d84a421..86d8ae55d 100644
--- a/mpfr/cmp_ui.c
+++ b/mpfr/cmp_ui.c
@@ -97,7 +97,7 @@ mpfr_cmp_si_2exp (mpfr_srcptr b, long int i, int f)
return MPFR_SIGN(b);
/* both signs differ */
else if (MPFR_IS_ZERO(b) || i == 0)
- return i == 0 ? (MPFR_IS_ZERO(b) ? 0 : MPFR_SIGN(b)) : si;
+ return i == 0 ? (MPFR_IS_ZERO(b) ? 0 : MPFR_SIGN(b)) : -si;
else
{ /* b and i are of same sign */
e = MPFR_EXP(b); /* 2^(e-1) <= b < 2^e */