1CIMAG(3) Linux Programmer's Manual CIMAG(3)
2
3
4
6 cimag, cimagf, cimagl - get imaginary part of a complex number
7
9 #include <complex.h>
10
11 double cimag(double complex z);
12 float cimagf(float complex z);
13 long double cimagl(long double complex z);
14
15 Link with -lm.
16
18 These functions return the imaginary part of the complex number z.
19
20 One has:
21
22 z = creal(z) + I * cimag(z)
23
25 These functions first appeared in glibc in version 2.1.
26
28 For an explanation of the terms used in this section, see
29 attributes(7).
30
31 ┌────────────────────────────┬───────────────┬─────────┐
32 │Interface │ Attribute │ Value │
33 ├────────────────────────────┼───────────────┼─────────┤
34 │cimag(), cimagf(), cimagl() │ Thread safety │ MT-Safe │
35 └────────────────────────────┴───────────────┴─────────┘
37 C99, POSIX.1-2001, POSIX.1-2008.
38
40 gcc also supports __imag__. That is a GNU extension.
41
43 cabs(3), creal(3), complex(7)
44
46 This page is part of release 5.02 of the Linux man-pages project. A
47 description of the project, information about reporting bugs, and the
48 latest version of this page, can be found at
49 https://www.kernel.org/doc/man-pages/.
50
51
52
53 2015-04-19 CIMAG(3)