pyodide/packages/numpy/patches/fix-longdouble.patch

18 lines
713 B
Diff
Raw Normal View History

2018-03-20 22:58:59 +00:00
diff --git a/numpy/core/src/npymath/npy_math_complex.c.src b/numpy/core/src/npymath/npy_math_complex.c.src
2018-09-10 16:55:37 +00:00
index cf427dad8..6c9f1c37e 100644
2018-03-20 22:58:59 +00:00
--- a/numpy/core/src/npymath/npy_math_complex.c.src
+++ b/numpy/core/src/npymath/npy_math_complex.c.src
2018-09-10 16:55:37 +00:00
@@ -1522,10 +1522,9 @@ _sum_squares@c@(@type@ x, @type@ y)
2018-03-20 22:58:59 +00:00
#if @precision@ == 1
const npy_float SQRT_MIN = 1.0842022e-19f;
2018-09-10 16:55:37 +00:00
#endif
2018-03-20 22:58:59 +00:00
-#if @precision@ == 2
2018-09-10 16:55:37 +00:00
+#if @precision@ == 2 || NPY_SIZEOF_LONGDOUBLE < 16
2018-03-20 22:58:59 +00:00
const npy_double SQRT_MIN = 1.4916681462400413e-154; /* sqrt(DBL_MIN) */
-#endif
-#if @precision@ == 3
+#elif @precision@ == 3
2018-09-10 16:55:37 +00:00
#if NPY_SIZEOF_LONGDOUBLE == NPY_SIZEOF_DOUBLE
const npy_longdouble SQRT_MIN = 1.4916681462400413e-154; /* sqrt(DBL_MIN) */
#else