## 2.4. Complex Floating-Point Types (C99)C99 supports mathematical calculations with complex
numbers. The 1999 standard introduced complex floating-point types
and extended the mathematical library to include complex arithmetic functions. These functions are declared in the header file A complex number = z + x x yi, where and x are real numbers, and yi is the imaginary unit, defined by the equation i^{2} = -1. The number is called the real part and x the imaginary part of y.zIn C, a complex number is represented by a pair of floating-point values for the real and imaginary parts. Both parts have the same type, whether `float _Complex``double _Complex``long double _Complex`
Each of these types has the same size and alignment as an array of two The header file #include <complex.h> // ... double complex z = 1.0 + 2.0 * I; z *= I; // Rotate z through 90° counterclockwise around the origin. |