| Types and the imaginary constant | |||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||
| Manipulation | |||||||||||||||||||||||||||||||
| Power and exponential functions | |||||||||||||||||||||||||||||||
| Trigonometric functions | |||||||||||||||||||||||||||||||
| Hyperbolic functions | |||||||||||||||||||||||||||||||
Defined in header <complex.h> | ||
float crealf(floatcomplex z); | (1) | (since C99) |
double creal(doublecomplex z); | (2) | (since C99) |
longdouble creall(longdoublecomplex z); | (3) | (since C99) |
Defined in header <tgmath.h> | ||
#define creal( z ) | (4) | (since C99) |
z.z has typelongdoublecomplex,longdoubleimaginary, orlongdouble,creall is called. Ifz has typefloatcomplex,floatimaginary, orfloat,crealf is called. Ifz has typedoublecomplex,doubleimaginary,double, or any integer type,creal is called.Contents |
| z | - | complex argument |
The real 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 imaginary part a complex number (function)[edit] |
C++ documentation forreal | |