1creal(3) Library Functions Manual creal(3)
2
3
4
6 creal, crealf, creall - get real part of a complex number
7
9 Math library (libm, -lm)
10
12 #include <complex.h>
13
14 double creal(double complex z);
15 float crealf(float complex z);
16 long double creall(long double complex z);
17
19 These functions return the real 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 │creal(), crealf(), creall() │ Thread safety │ MT-Safe │
33 └────────────────────────────────────────────┴───────────────┴─────────┘
34
36 GCC supports also __real__. That is a GNU extension.
37
39 C11, POSIX.1-2008.
40
42 glibc 2.1. C99, POSIX.1-2001.
43
45 cabs(3), cimag(3), complex(7)
46
47
48
49Linux man-pages 6.05 2023-07-20 creal(3)