re

re(x)

Try it yourself:

See also:

re(): Real Part of a Complex Value

re() extracts the real component of a complex number. For 3 + 4i, re returns 3. This is useful for signals, phasors, and separating Cartesian components.

Complex components

Use im() for the imaginary component, abs() for magnitude, and arg() for phase. For a real input, re simply returns the input.

Do not confuse real-part extraction with rounding or type conversion. Preserve both components until the model explicitly calls for a real projection; dropping the imaginary part can change the meaning of a calculation.

All functions