Function reference · Complex

rectform

Writes a complex expression in rectangular form, a + b·i.

It rewrites polar forms r·e^(iθ) with cosine and sine.

Notation

rectform(x)

Write it in an expression: nerdamer('rectform(2*e^(i*pi/3))'), or in the Playground.

nerdamer.rectform

nerdamer.rectform(x: ExpressionInput): Expression

A method on the default import. Arguments can be strings, as in Notation.

Examples

A special angle.

rectform(2*e^(i*pi/3))
// → 1+3^(1/2)*i
Open in Playground

Back from polar form.

rectform(sqrt(34)*e^(i*atan(3/5)))
// → 5+3*i
Open in Playground

← Back to Function reference