diff options
| author | mattip <matti.picus@gmail.com> | 2022-08-11 10:46:30 +0300 |
|---|---|---|
| committer | mattip <matti.picus@gmail.com> | 2022-08-21 18:26:10 +0300 |
| commit | 16a64051c1d71579527dbfa70f3600eaf9cc6448 (patch) | |
| tree | ac83f8237fbb375c1c967022344ce0ef5fa93a6b /numpy/core/src/npymath | |
| parent | c35cb18f3e20c3b072adfc2f1bed86e6ca89d172 (diff) | |
| download | numpy-16a64051c1d71579527dbfa70f3600eaf9cc6448.tar.gz | |
restore HAVE_POWL for macOS blocklisting
Signed-off-by: mattip <matti.picus@gmail.com>
Diffstat (limited to 'numpy/core/src/npymath')
| -rw-r--r-- | numpy/core/src/npymath/npy_math_internal.h.src | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/numpy/core/src/npymath/npy_math_internal.h.src b/numpy/core/src/npymath/npy_math_internal.h.src index ab5576a0b..5d22d1191 100644 --- a/numpy/core/src/npymath/npy_math_internal.h.src +++ b/numpy/core/src/npymath/npy_math_internal.h.src @@ -193,7 +193,9 @@ NPY_INPLACE @type@ npy_@kind@@c@(@type@ x) } /**end repeat1**/ + /* Optional C99 functions */ + /**begin repeat1 * #kind = log2# * #KIND = LOG2# @@ -210,17 +212,41 @@ NPY_INPLACE @type@ npy_@kind@@c@(@type@ x) #undef WORKAROUND_APPLE_TRIG_BUG /**begin repeat1 - * #kind = atan2,hypot,pow,fmod,copysign# - * #KIND = ATAN2,HYPOT,POW,FMOD,COPYSIGN# + * #kind = pow# + * #KIND = POW# */ +#ifdef @kind@@c@ +#undef @kind@@c@ +#endif +#ifndef HAVE_@KIND@@C@ +NPY_INPLACE @type@ npy_@kind@@c@(@type@ x, @type@ y) +{ + return (@type@) npy_@kind@((double)x, (double) y); +} +#endif + +#ifdef HAVE_@KIND@@C@ NPY_INPLACE @type@ npy_@kind@@c@(@type@ x, @type@ y) { return NPY__FP_SFX(@kind@)(x, y); } +#endif /**end repeat1**/ + /* C99 mandatory */ +/**begin repeat1 + * #kind = atan2,hypot,fmod,copysign# + * #KIND = ATAN2,HYPOT,FMOD,COPYSIGN# + */ +NPY_INPLACE @type@ npy_@kind@@c@(@type@ x, @type@ y) +{ + return NPY__FP_SFX(@kind@)(x, y); +} +/**end repeat1**/ + + NPY_INPLACE @type@ npy_modf@c@(@type@ x, @type@ *iptr) { return NPY__FP_SFX(modf)(x, iptr); |
