# **[](https://en.cppreference.com/w/c/header/complex)** provides `_Complex` type (C99) and complex number functions: magnitude (`cabs`), phase (`carg`), conjugate (`conj`), and full trigonometric/exponential support. Arithmetic operators work natively on complex types. Use it for signal processing, electrical engineering, and quantum mechanics where complex arithmetic is essential. ## Example This example performs complex arithmetic and demonstrates Euler's formula relationship. ```c // compile: gcc -std=c99 -o complexexample complexexample.c -lm // run: ./complexexample // description: complex arithmetic and magnitude calculation #include #include #include int main() { double complex z = 3.0 + 4.0 * I; printf("|z| = %.1f\n", cabs(z)); printf("arg(z) = %.4f rad\n", carg(z)); printf("conj(z) = %.1f%+.1fi\n", creal(conj(z)), cimag(conj(z))); double complex euler = cexp(I * M_PI); printf("e^(i*pi) ≈ %.6f%+.6fi\n", creal(euler), cimag(euler)); return 0; } ```