summaryrefslogtreecommitdiff
path: root/mpfr-impl.h
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2005-09-02 14:08:09 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2005-09-02 14:08:09 +0000
commit6ca09f1465cee45788d94557322b4c0f078719d3 (patch)
tree8e38cd26fa064b9ca2fe06f1d1ea36f6b08f1248 /mpfr-impl.h
parent4167484fe2195ae50160ad2dfda856edab8525f7 (diff)
downloadmpfr-6ca09f1465cee45788d94557322b4c0f078719d3.tar.gz
Avoid MIPSpro / IRIX64 (incorrect) optimizations for DOUBLE_ISNAN.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3776 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr-impl.h')
-rw-r--r--mpfr-impl.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/mpfr-impl.h b/mpfr-impl.h
index 98c4d227e..614418416 100644
--- a/mpfr-impl.h
+++ b/mpfr-impl.h
@@ -347,7 +347,9 @@ typedef union ieee_double_extract Ieee_double_extract;
#else
# define DOUBLE_ISINF(x) ((x) > DBL_MAX || (x) < -DBL_MAX)
# if MPFR_NANISNAN
-# define DOUBLE_ISNAN(x) (!((x) >= 0.0 || (x) <= 0.0))
+/* Avoid MIPSpro / IRIX64 (incorrect) optimizations.
+ The + must not be replaced by a ||. */
+# define DOUBLE_ISNAN(x) (!(((x) >= 0.0) + ((x) <= 0.0)))
# else
# define DOUBLE_ISNAN(x) ((x) != (x))
# endif