Qu

re

Builtin index · Core maths

result = re(x)

Input: x · Output: result

What it is

Real component of a Complex/CVec/CMat (identity — x passed through unchanged — when x is already real). x is a scalar, Vec, or Mat (real or complex).

Overloads

x can be scalar, Vec, Mat, or Complex.

2 forms. Each carries its own inputs, outputs and worked example — pick the tab for the one you are calling.

CodeInputOutputDescription
result = re(x)
x scalar, Vec, or Matnot documented yet
result Complex, Num, CVec, Vec, CMat, or Mat
Identity — passed through unchanged.

Examples

Written for this form and run by the build -- the output below is what the engine actually produced.

print(re(5))   # 5

output
5
CodeInputOutputDescription
result = re(x)
x Complexnot documented yet
result —
Returns just the real component, discarding the imaginary part.

Examples

Written for this form and run by the build -- the output below is what the engine actually produced.

print(re(3 + 4j))   # 3

output
3

See also

real — documented in the same entry.