summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/npymath/npy_math_complex.c.src9
1 files changed, 8 insertions, 1 deletions
diff --git a/numpy/core/src/npymath/npy_math_complex.c.src b/numpy/core/src/npymath/npy_math_complex.c.src
index c4867e28d..a50059615 100644
--- a/numpy/core/src/npymath/npy_math_complex.c.src
+++ b/numpy/core/src/npymath/npy_math_complex.c.src
@@ -1565,6 +1565,7 @@ _real_part_reciprocalf(npy_float x, npy_float y)
#undef BIAS
#undef CUTOFF
#endif
+
#if @precision@ == 2
#define BIAS (DBL_MAX_EXP - 1)
/* more guard digits are useful iff there is extra precision. */
@@ -1604,8 +1605,11 @@ _real_part_reciprocal(npy_double x, npy_double y)
#undef BIAS
#undef CUTOFF
#endif
+
#if @precision@ == 3
-#ifndef HAVE_LDOUBLE_DOUBLE_DOUBLE_BE
+#if !defined(HAVE_LDOUBLE_DOUBLE_DOUBLE_BE) && \
+ !defined(HAVE_LDOUBLE_DOUBLE_DOUBLE_LE)
+
#define BIAS (LDBL_MAX_EXP - 1)
#define CUTOFF (LDBL_MANT_DIG / 2 + 1)
static NPY_INLINE npy_longdouble
@@ -1638,13 +1642,16 @@ _real_part_reciprocall(npy_longdouble x,
}
#undef BIAS
#undef CUTOFF
+
#else
+
static NPY_INLINE npy_longdouble
_real_part_reciprocall(npy_longdouble x,
npy_longdouble y)
{
return x/(x*x + y*y);
}
+
#endif
#endif