summaryrefslogtreecommitdiff
path: root/numpy/core/feature_detection_cmath.h
blob: 1dd71c643980c2af80a4b0df9a4b1e801066210e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <complex.h>

#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
#define cfloat _Fcomplex
#define cdouble _Dcomplex
#define cldouble _Lcomplex
#else
#define cfloat complex float
#define cdouble complex double
#define cldouble complex long double
#endif

// musl libc defines the following macros which breaks the declarations.
// See https://git.musl-libc.org/cgit/musl/tree/include/complex.h#n108
#undef crealf
#undef cimagf
#undef conjf
#undef creal
#undef cimag
#undef conj
#undef creall
#undef cimagl
#undef cconjl

cfloat csinf(cfloat);
cfloat ccosf(cfloat);
cfloat ctanf(cfloat);
cfloat csinhf(cfloat);
cfloat ccoshf(cfloat);
cfloat ctanhf(cfloat);
float crealf(cfloat);
float cimagf(cfloat);
cfloat conjf(cfloat);

cdouble csin(cdouble);
cdouble ccos(cdouble);
cdouble ctan(cdouble);
cdouble csinh(cdouble);
cdouble ccosh(cdouble);
cdouble ctanh(cdouble);
double creal(cdouble);
double cimag(cdouble);
cdouble conj(cdouble);

cldouble csinl(cldouble);
cldouble ccosl(cldouble);
cldouble ctanl(cldouble);
cldouble csinhl(cldouble);
cldouble ccoshl(cldouble);
cldouble ctanhl(cldouble);
long double creall(cldouble);
long double cimagl(cldouble);
cldouble conjl(cldouble);