don't try to use extended-precision of signbit, isnan, isinf

ok wcmaier@, naddy@
This commit is contained in:
martynas 2008-07-30 17:49:32 +00:00
parent f32cb3c378
commit f01b47c759
2 changed files with 32 additions and 2 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.7 2007/11/16 11:42:25 djm Exp $
# $OpenBSD: Makefile,v 1.8 2008/07/30 17:49:32 martynas Exp $
SHARED_ONLY= Yes
COMMENT= fast array and numeric programming library for Python
DISTNAME= numpy-1.0.4
PKGNAME= py-${DISTNAME}
PKGNAME= py-${DISTNAME}p0
CATEGORIES= math devel
MAINTAINER= Damien Miller <djm@openbsd.org>

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-numpy_core_src_umathmodule_c_src,v 1.1 2008/07/30 17:49:32 martynas Exp $
--- numpy/core/src/umathmodule.c.src.orig Thu Nov 8 00:05:16 2007
+++ numpy/core/src/umathmodule.c.src Wed Jul 30 17:44:41 2008
@@ -375,7 +375,7 @@ rint (double x)
#else /* !defined(isnan) */
-#define isnanl(x) isnan((x))
+#define isnanl(x) isnan((double)(x))
#define isnanf(x) isnan((x))
#endif /* !defined(isnan) */
@@ -393,7 +393,7 @@ rint (double x)
#else /* !defined(isinf) */
-#define isinfl(x) isinf((x))
+#define isinfl(x) isinf((double)(x))
#define isinff(x) isinf((x))
#endif /* !defined(isinf) */
@@ -403,7 +403,7 @@ rint (double x)
#define signbitl(x) ((longdouble) signbit((double)(x)))
#define signbitf(x) ((float) signbit((double) (x)))
#else
-#define signbitl(x) signbit((x))
+#define signbitl(x) signbit((double)(x))
#define signbitf(x) signbit((x))
#endif