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.

Try Re in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions