Real and complex
From cppreference.com
When a value of real type is converted to a complex type, the real part of the complex result value is determined by the rules of conversion to the corresponding real type (see Real floating types) and the imaginary part of the complex result value is a positive zero or an unsigned zero.
When a value of complex type is converted to a real type, the imaginary part of the complex value is discarded and the value of the real part is converted according to the conversion rules for the corresponding real type (see Real floating types).
[edit] Example
Run this code
Possible output:
1.0+0.0i 3.0