summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/npymath/npy_math_private.h16
-rw-r--r--numpy/core/src/private/npy_fpmath.h3
2 files changed, 18 insertions, 1 deletions
diff --git a/numpy/core/src/npymath/npy_math_private.h b/numpy/core/src/npymath/npy_math_private.h
index 3f3ed6bcd..5e309a30b 100644
--- a/numpy/core/src/npymath/npy_math_private.h
+++ b/numpy/core/src/npymath/npy_math_private.h
@@ -203,6 +203,22 @@ do { \
};
#define LDBL_NBIT 0x80000000
#define mask_nbit_l(u) ((u).bits.manh &= ~LDBL_NBIT)
+#elif defined(HAVE_LDOUBLE_IEEE_DOUBLE_16_BYTES_BE)
+ /* 64 bits IEEE double precision aligned on 16 bytes: used by ppc arch on
+ * Mac OS X */
+ union IEEEl2bits {
+ npy_longdouble e;
+ struct {
+ npy_uint32 sign :1;
+ npy_uint32 exp :11;
+ npy_uint32 manh :20;
+ npy_uint32 manl :32;
+ npy_uint32 junkh :32;
+ npy_uint32 junkl :32;
+ } bits;
+ };
+ #define LDBL_NBIT 0
+ #define mask_nbit_l(u) ((void)0)
#elif defined(HAVE_LDOUBLE_IEEE_QUAD_BE)
/* Quad precision IEEE format */
union IEEEl2bits {
diff --git a/numpy/core/src/private/npy_fpmath.h b/numpy/core/src/private/npy_fpmath.h
index 8b0253dce..4b45a12dc 100644
--- a/numpy/core/src/private/npy_fpmath.h
+++ b/numpy/core/src/private/npy_fpmath.h
@@ -28,7 +28,7 @@
#elif defined(NPY_CPU_AMD64)
#define HAVE_LDOUBLE_INTEL_EXTENDED_16_BYTES_LE
#elif defined(NPY_CPU_PPC) || defined(NPY_CPU_PPC64)
- #define HAVE_LDOUBLE_IEEE_QUAD_BE
+ #define HAVE_LDOUBLE_IEEE_DOUBLE_16_BYTES_BE
#endif
#endif
#endif
@@ -37,6 +37,7 @@
defined(HAVE_LDOUBLE_IEEE_QUAD_LE) || \
defined(HAVE_LDOUBLE_IEEE_DOUBLE_LE) || \
defined(HAVE_LDOUBLE_IEEE_DOUBLE_BE) || \
+ defined(HAVE_LDOUBLE_IEEE_DOUBLE_16_BYTES_BE) || \
defined(HAVE_LDOUBLE_INTEL_EXTENDED_16_BYTES_LE) || \
defined(HAVE_LDOUBLE_INTEL_EXTENDED_12_BYTES_LE))
#error No long double representation defined