2
1

0003-BUG-Ensure-_npy_scaled_cexp-f-l-is-defined-when-need.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 9aa5d577c58f04f9606674dd6f326aee1bf1e6e8 Mon Sep 17 00:00:00 2001
  2. From: Charles Harris <charlesr.harris@gmail.com>
  3. Date: Thu, 21 Sep 2017 10:10:05 -0600
  4. Subject: [PATCH] BUG: Ensure `_npy_scaled_cexp{,f,l}` is defined when needed.
  5. The `_npy_scaled_cexp{,f,l}` functions were previously only defined when
  6. the npy_cexp fallback functions were needed, but they are also called by
  7. the npy_csinh and npy_ccosh functions.
  8. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
  9. ---
  10. numpy/core/src/npymath/npy_math_complex.c.src | 8 +++++++-
  11. 1 file changed, 7 insertions(+), 1 deletion(-)
  12. diff --git a/numpy/core/src/npymath/npy_math_complex.c.src b/numpy/core/src/npymath/npy_math_complex.c.src
  13. index a82a6737c..fb31e8e6a 100644
  14. --- a/numpy/core/src/npymath/npy_math_complex.c.src
  15. +++ b/numpy/core/src/npymath/npy_math_complex.c.src
  16. @@ -184,7 +184,9 @@ npy_carg@c@(@ctype@ z)
  17. #define SCALED_CEXP_LOWERL 11357.216553474703895L
  18. #define SCALED_CEXP_UPPERL 22756.021937783004509L
  19. -#ifndef HAVE_CEXP@C@
  20. +#if !defined(HAVE_CSINH@C@) || \
  21. + !defined(HAVE_CCOSH@C@) || \
  22. + !defined(HAVE_CEXP@C@)
  23. static
  24. @ctype@
  25. @@ -212,6 +214,10 @@ _npy_scaled_cexp@c@(@type@ x, @type@ y, npy_int expt)
  26. npy_ldexp@c@(mant * mantsin, expt + exsin));
  27. }
  28. +#endif
  29. +
  30. +#ifndef HAVE_CEXP@C@
  31. +
  32. @ctype@
  33. npy_cexp@c@(@ctype@ z)
  34. {
  35. --
  36. 2.11.0