summaryrefslogtreecommitdiff
path: root/eq.c
diff options
context:
space:
mode:
authorhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2000-12-13 14:50:13 +0000
committerhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2000-12-13 14:50:13 +0000
commit3035f62d87667e08ac5370bca1e47fe8f683c2e8 (patch)
treec92b2c9b03671e77b17f5ca89f731e53cdfaa1ce /eq.c
parentee574c97721b76618933ca6d5738f948e7abe1ec (diff)
downloadmpfr-3035f62d87667e08ac5370bca1e47fe8f683c2e8.tar.gz
Take into account Inf, Nans ; clear the flags of the return variable
in most function calls. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@851 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'eq.c')
-rw-r--r--eq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eq.c b/eq.c
index f7eceb02a..004cf0667 100644
--- a/eq.c
+++ b/eq.c
@@ -73,6 +73,8 @@ mpfr_eq (u, v, n_bits)
return (MPFR_IS_INF(v) && (usign == MPFR_SIGN(v)));
else if (MPFR_IS_INF(v)) return 0;
+ if (MPFR_IS_NAN(u) || MPFR_IS_NAN(v)) return 0;
+
/* 2. Are the exponents different? */
if (uexp > vexp)
return 0; /* ??? handle (uexp = vexp + 1) */