About complex (complex types) and imaginary (imaginary types) in C languages
In fact, the plural complex here is the plural of mathematics, including the real part and the imaginary part of two parts, such as: X=2.1+6i, the following detailed introduction.
C99 new Complex Type (_complex) and imaginary type (_imaginary). Simply put, C99 offers three complex types: float _complex,double _complex, and long double _complex. For a variable of type float _complex, it contains two values of type float, one for the real part of the complex number, and another to represent the imaginary part (imaginary parts). Similarly, a double _complex contains two values of type double. C99 also offers three imaginary types: float _imaginary,double _imaginary, and long double _imaginary. Imaginary type only imaginary part, no real part.
With the standard header file Complex.h, we can use complex to represent the _complex, use the imaginary to represent the _imaginary, and use I to represent the imaginary unit I, which is the square root of 1. For example:
#include <complex.h>
Double _complex x = 5.2;
Double Complex y = 5.0 * I;
Double complex z = 5.2–5.0 * I;
Note: The _complex type is optional for stand-alone environments (freestanding environment). Optionally, it is not mandatory to support this type. The so-called standalone environment means that C programs can run without an operating system. The _imaginary type is optional in any environment. The current compiler is not very good at both types of support, so there is no more in-depth discussion of these two types.
Transferred from http://blog.csdn.net/zxxssdsd/article/details/9948817, only for individual learning use.
About complex (complex types) and imaginary (imaginary types) in C languages