1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" SPDX-License-Identifier: GPL-1.0-or-later
5 .TH CIMAG 3 2021-03-22 "Linux man-pages (unreleased)"
7 cimag, cimagf, cimagl \- get imaginary part of a complex number
10 .RI ( libm ", " \-lm )
13 .B #include <complex.h>
15 .BI "double cimag(double complex " z );
16 .BI "float cimagf(float complex " z );
17 .BI "long double cimagl(long double complex " z );
20 These functions return the imaginary part of the complex number
27 z = creal(z) + I * cimag(z)
31 These functions first appeared in glibc in version 2.1.
33 For an explanation of the terms used in this section, see
41 Interface Attribute Value
46 T} Thread safety MT-Safe
52 C99, POSIX.1-2001, POSIX.1-2008.
54 gcc also supports __imag__.
55 That is a GNU extension.