Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2348023

Browse files
committed
MAINT: make sure npy_math builds when long double is double double
1 parent 863d97d commit 2348023

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

numpy/core/src/npymath/npy_math_complex.c.src

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,6 +1444,7 @@ static inline npy_double _real_part_reciprocal(npy_double x, npy_double y)
14441444
#undef CUTOFF
14451445
#endif
14461446
#if @precision@ == 3
1447+
#ifndef HAVE_LDOUBLE_DOUBLE_DOUBLE_BE
14471448
#define BIAS (LDBL_MAX_EXP - 1)
14481449
#define CUTOFF (LDBL_MANT_DIG / 2 + 1)
14491450
static inline npy_longdouble _real_part_reciprocall(npy_longdouble x,
@@ -1472,6 +1473,13 @@ static inline npy_longdouble _real_part_reciprocall(npy_longdouble x,
14721473
}
14731474
#undef BIAS
14741475
#undef CUTOFF
1476+
#else
1477+
static inline npy_longdouble _real_part_reciprocall(npy_longdouble x,
1478+
npy_longdouble y)
1479+
{
1480+
return x/(x*x + y*y);
1481+
}
1482+
#endif
14751483
#endif
14761484

14771485
@ctype@ npy_catanh@c@(@ctype@ z)

0 commit comments

Comments
 (0)