| Types and the imaginary constant | |||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||
| Manipulation | |||||||||||||||||||||||||||||||
| Power and exponential functions | |||||||||||||||||||||||||||||||
| Trigonometric functions | |||||||||||||||||||||||||||||||
| Hyperbolic functions | |||||||||||||||||||||||||||||||
Defined in header <complex.h> | ||
float cimagf(floatcomplex z); | (1) | (since C99) |
double cimag(doublecomplex z); | (2) | (since C99) |
longdouble cimagl(longdoublecomplex z); | (3) | (since C99) |
Defined in header <tgmath.h> | ||
#define cimag( z ) | (4) | (since C99) |
z.z has typelongdoublecomplex,longdoubleimaginary, orlongdouble,cimagl is called. Ifz has typefloatcomplex,floatimaginary, orfloat,cimagf is called. Ifz has typedoublecomplex,doubleimaginary,double, or any integer type,cimag is called.Contents |
| z | - | complex argument |
The imaginary part ofz.
This function is fully specified for all possible inputs and is not subject to any errors described inmath_errhandling
For any complex variablez,z==creal(z)+ I*cimag(z).
Output:
1.000000+2.000000i
(C99)(C99)(C99) | computes the real part of a complex number (function)[edit] |
C++ documentation forimag | |