summaryrefslogtreecommitdiff
path: root/numpy/core/setup_common.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-01-28 09:33:48 -0700
committerCharles Harris <charlesr.harris@gmail.com>2015-01-28 12:13:35 -0700
commitde681b72314d666cb014b2f11358de66a3aaa337 (patch)
tree1f7919d213e0f3fcb93630229eaa8ece082d74b8 /numpy/core/setup_common.py
parent0a7fe2e6c29a2007a32a6386b0762bf1a6fdffc6 (diff)
downloadnumpy-de681b72314d666cb014b2f11358de66a3aaa337.tar.gz
ENH: Detect all functions in complex.h
Set the HAVE_XXXX macros for all of the following functions. csin, ccos, ctan casin, cacos, catan csinh, ccosh, ctanh casinh, cacosh, catanh cexp, clog, cpow cabs, csqrt, carg cimag, creal, conj, cproj The macros do not need to be used, but it is good to have all of them available.
Diffstat (limited to 'numpy/core/setup_common.py')
-rw-r--r--numpy/core/setup_common.py32
1 files changed, 19 insertions, 13 deletions
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
index 0b18bc6c6..507c4e738 100644
--- a/numpy/core/setup_common.py
+++ b/numpy/core/setup_common.py
@@ -138,23 +138,29 @@ OPTIONAL_FUNCTION_ATTRIBUTES = [('__attribute__((optimize("unroll-loops")))',
OPTIONAL_VARIABLE_ATTRIBUTES = ["__thread", "__declspec(thread)"]
# Subset of OPTIONAL_STDFUNCS which may alreay have HAVE_* defined by Python.h
-OPTIONAL_STDFUNCS_MAYBE = ["expm1", "log1p", "acosh", "atanh", "asinh", "hypot",
- "copysign", "ftello", "fseeko"]
+OPTIONAL_STDFUNCS_MAYBE = [
+ "expm1", "log1p", "acosh", "atanh", "asinh", "hypot", "copysign",
+ "ftello", "fseeko"
+ ]
# C99 functions: float and long double versions
-C99_FUNCS = ["sin", "cos", "tan", "sinh", "cosh", "tanh", "fabs", "floor",
- "ceil", "rint", "trunc", "sqrt", "log10", "log", "log1p", "exp",
- "expm1", "asin", "acos", "atan", "asinh", "acosh", "atanh",
- "hypot", "atan2", "pow", "fmod", "modf", 'frexp', 'ldexp',
- "exp2", "log2", "copysign", "nextafter", "cbrt"]
-
+C99_FUNCS = [
+ "sin", "cos", "tan", "sinh", "cosh", "tanh", "fabs", "floor", "ceil",
+ "rint", "trunc", "sqrt", "log10", "log", "log1p", "exp", "expm1",
+ "asin", "acos", "atan", "asinh", "acosh", "atanh", "hypot", "atan2",
+ "pow", "fmod", "modf", 'frexp', 'ldexp', "exp2", "log2", "copysign",
+ "nextafter", "cbrt"
+ ]
C99_FUNCS_SINGLE = [f + 'f' for f in C99_FUNCS]
C99_FUNCS_EXTENDED = [f + 'l' for f in C99_FUNCS]
-
-C99_COMPLEX_TYPES = ['complex double', 'complex float', 'complex long double']
-
-C99_COMPLEX_FUNCS = ['creal', 'cimag', 'cabs', 'carg', 'cexp', 'csqrt', 'clog',
- 'ccos', 'csin', 'cpow']
+C99_COMPLEX_TYPES = [
+ 'complex double', 'complex float', 'complex long double'
+ ]
+C99_COMPLEX_FUNCS = [
+ "cabs", "cacos", "cacosh", "carg", "casin", "casinh", "catan",
+ "catanh", "ccos", "ccosh", "cexp", "cimag", "clog", "conj", "cpow",
+ "cproj", "creal", "csin", "csinh", "csqrt", "ctan", "ctanh"
+ ]
def fname2def(name):
return "HAVE_%s" % name.upper()