summaryrefslogtreecommitdiff
path: root/cmp.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>1999-10-20 13:25:13 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>1999-10-20 13:25:13 +0000
commit85a0b8b8f641e4489fe2fd5eea091c15bcbec5d8 (patch)
tree56ba716c262483a354398f8922c9c0c3c62521de /cmp.c
parent803171986e7e8cc30423219f5967dd6fef2f352f (diff)
downloadmpfr-85a0b8b8f641e4489fe2fd5eea091c15bcbec5d8.tar.gz
mpfr_cmp2(b,c) now returns PREC(b) if b=c, even if c=0
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@402 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'cmp.c')
-rw-r--r--cmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmp.c b/cmp.c
index 9d8dc3491..501b8a5ee 100644
--- a/cmp.c
+++ b/cmp.c
@@ -101,7 +101,7 @@ mpfr_cmp2(b, c)
printf("b="); mpfr_print_raw(b); putchar('\n');
printf("c="); mpfr_print_raw(c); putchar('\n');
#endif
- if (NOTZERO(c)==0) return 0;
+ if (NOTZERO(c)==0) return (NOTZERO(b)) ? 0 : PREC(b);
d = EXP(b)-EXP(c);
k = 0; /* result can be d or d+1 if d>1, or >= d otherwise */
#ifdef DEBUG