Function reference · Complex

realpart

Returns the real component of a complex expression.

Nerdamer expands supported algebraic structure and separates known real and complex factors. Expressions whose complex component cannot yet be resolved can remain under realpart(...).

Examples

These examples use Nerdamer Notation.

Extract the real component of a numeric complex value.

realpart(3+2*i)
// → 3

Expand a symbolic complex product and collect its real component.

realpart((a+b*i)*(c+d*i))
// → a*c-b*d

Interfaces

The same operation is available through the interfaces below.

Nerdamer Notation · nerdamer API

Nerdamer Notation

Use this form inside input passed to nerdamer(...).

realpart(arg1)

nerdamer.realpart

Call the operation through the default nerdamer import.

nerdamer.realpart(a: Expression): Expression

Parameters

NameTypeDescription
aExpression—

Returns

Expression

Browse the nerdamer API →

← Back to Function reference