Using the Complex Arithmetic Library
Complex numbers are numbers made up of a real part and an imaginary
part. For example:
3.2 + 4i 1 + 3i 1 + 2.3i
In the degenerate case, 0 + 3i is an entirely imaginary number
generally written as 3i, and 5 + 0i is an entirely real number generally
written as 5. You can represent complex numbers using the complex data type.
Note - The complex arithmetic library ( libcomplex) is available only for compatibility mode (
-compat[ =4]). In standard mode (the default mode), complex number classes with similar functionality are
included with the C++ Standard Library libCstd.