Function reference · Complex

imagpart

Returns the imaginary part of a complex expression.

Products and sums are multiplied out first. A real expression gives 0. If the imaginary part can't be separated, the call is returned unevaluated.

Notation

imagpart(args)

Write it in an expression: nerdamer('imagpart(3+2*i)'), or in the Playground.

nerdamer.imagpart

nerdamer.imagpart(...args: [a]): Expression

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

Examples

A number.

imagpart(3+2*i)
// → 2
Open in Playground

A product, multiplied out.

imagpart((a+b*i)*(c+d*i))
// → a*d+b*c
Open in Playground

A real number gives 0.

imagpart(5)
// → 0
Open in Playground

← Back to Function reference