1cimag(3) Library Functions Manual cimag(3)
2
3
4
6 cimag, cimagf, cimagl - get imaginary part of a complex number
7
9 Math library (libm, -lm)
10
12 #include <complex.h>
13
14 double cimag(double complex z);
15 float cimagf(float complex z);
16 long double cimagl(long double complex z);
17
19 These functions return the imaginary part of the complex number z.
20
21 One has:
22
23 z = creal(z) + I * cimag(z)
24
26 For an explanation of the terms used in this section, see at‐
27 tributes(7).
28
29 ┌────────────────────────────────────────────┬───────────────┬─────────┐
30 │Interface │ Attribute │ Value │
31 ├────────────────────────────────────────────┼───────────────┼─────────┤
32 │cimag(), cimagf(), cimagl() │ Thread safety │ MT-Safe │
33 └────────────────────────────────────────────┴───────────────┴─────────┘
34
36 GCC also supports __imag__. That is a GNU extension.
37
39 C11, POSIX.1-2008.
40
42 glibc 2.1. C99, POSIX.1-2001.
43
45 cabs(3), creal(3), complex(7)
46
47
48
49Linux man-pages 6.04 2023-03-30 cimag(3)