summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-04-07 14:06:14 (GMT)
committerGuido van Rossum <guido@python.org>1993-04-07 14:06:14 (GMT)
commit9575a4457559ed280bdd66e600fbd9f1b54d86d2 (patch)
tree3cc2134f011f7f4a4cf595c6ca8aa0bb2a437ed6 /Objects/floatobject.c
parentf56e3db1dd4bedc9331933504f5008a03f5d3131 (diff)
downloadcpython-9575a4457559ed280bdd66e600fbd9f1b54d86d2.zip
cpython-9575a4457559ed280bdd66e600fbd9f1b54d86d2.tar.gz
cpython-9575a4457559ed280bdd66e600fbd9f1b54d86d2.tar.bz2
* Microscopic corrections to make things compile on the Cray APP.
* Removed one use of $> in Makefile and warned about others. Added configurable lines in Makefile to change CC and AR.
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 8533e0e..6a95ebf 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -38,6 +38,11 @@ extern int errno;
#include <ctype.h>
#include <math.h>
+#ifdef i860
+/* Cray APP has bogus definition of HUGE_VAL in <math.h> */
+#undef HUGE_VAL
+#endif
+
#ifdef HUGE_VAL
#define CHECK(x) if (errno != 0) ; \
else if (-HUGE_VAL <= (x) && (x) <= HUGE_VAL) ; \
@@ -170,6 +175,7 @@ float_hash(v)
}
else {
fractpart = frexp(fractpart, &expo);
+ fractpart = fractpart*4294967296.0; /* 2**32 */
x = (long) (intpart + fractpart) ^ expo; /* Rather arbitrary */
}
if (x == -1)