1complex.h(0P) POSIX Programmer's Manual complex.h(0P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 complex.h — complex arithmetic
13
15 #include <complex.h>
16
18 The functionality described on this reference page is aligned with the
19 ISO C standard. Any conflict between the requirements described here
20 and the ISO C standard is unintentional. This volume of POSIX.1‐2017
21 defers to the ISO C standard.
22
23 The <complex.h> header shall define the following macros:
24
25 complex Expands to _Complex.
26
27 _Complex_I Expands to a constant expression of type const float _Com‐
28 plex, with the value of the imaginary unit (that is, a num‐
29 ber i such that i2=-1).
30
31 imaginary Expands to _Imaginary.
32
33 _Imaginary_I
34 Expands to a constant expression of type const float _Imag‐
35 inary with the value of the imaginary unit.
36
37 I Expands to either _Imaginary_I or _Complex_I. If _Imagi‐
38 nary_I is not defined, I expands to _Complex_I.
39
40 The macros imaginary and _Imaginary_I shall be defined if and only if
41 the implementation supports imaginary types.
42
43 An application may undefine and then, perhaps, redefine the complex,
44 imaginary, and I macros.
45
46 The following shall be declared as functions and may also be defined as
47 macros. Function prototypes shall be provided.
48
49
50 double cabs(double complex);
51 float cabsf(float complex);
52 long double cabsl(long double complex);
53 double complex cacos(double complex);
54 float complex cacosf(float complex);
55 double complex cacosh(double complex);
56 float complex cacoshf(float complex);
57 long double complex cacoshl(long double complex);
58 long double complex cacosl(long double complex);
59 double carg(double complex);
60 float cargf(float complex);
61 long double cargl(long double complex);
62 double complex casin(double complex);
63 float complex casinf(float complex);
64 double complex casinh(double complex);
65 float complex casinhf(float complex);
66 long double complex casinhl(long double complex);
67 long double complex casinl(long double complex);
68 double complex catan(double complex);
69 float complex catanf(float complex);
70 double complex catanh(double complex);
71 float complex catanhf(float complex);
72 long double complex catanhl(long double complex);
73 long double complex catanl(long double complex);
74 double complex ccos(double complex);
75 float complex ccosf(float complex);
76 double complex ccosh(double complex);
77 float complex ccoshf(float complex);
78 long double complex ccoshl(long double complex);
79 long double complex ccosl(long double complex);
80 double complex cexp(double complex);
81 float complex cexpf(float complex);
82 long double complex cexpl(long double complex);
83 double cimag(double complex);
84 float cimagf(float complex);
85 long double cimagl(long double complex);
86 double complex clog(double complex);
87 float complex clogf(float complex);
88 long double complex clogl(long double complex);
89 double complex conj(double complex);
90 float complex conjf(float complex);
91 long double complex conjl(long double complex);
92 double complex cpow(double complex, double complex);
93 float complex cpowf(float complex, float complex);
94 long double complex cpowl(long double complex, long double complex);
95 double complex cproj(double complex);
96 float complex cprojf(float complex);
97 long double complex cprojl(long double complex);
98 double creal(double complex);
99 float crealf(float complex);
100 long double creall(long double complex);
101 double complex csin(double complex);
102 float complex csinf(float complex);
103 double complex csinh(double complex);
104 float complex csinhf(float complex);
105 long double complex csinhl(long double complex);
106 long double complex csinl(long double complex);
107 double complex csqrt(double complex);
108 float complex csqrtf(float complex);
109 long double complex csqrtl(long double complex);
110 double complex ctan(double complex);
111 float complex ctanf(float complex);
112 double complex ctanh(double complex);
113 float complex ctanhf(float complex);
114 long double complex ctanhl(long double complex);