Function reference · Complex

arg

Returns the argument (angle) of a complex number, from -π to π.

It uses atan2, so the quadrant is always right.

Notation

arg(x)

Write it in an expression: nerdamer('arg(1+i)'), or in the Playground.

nerdamer.arg

nerdamer.arg(x: ExpressionInput): Expression

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

Examples

First quadrant.

arg(1+i)
// → (1/4)*pi
Open in Playground

Third quadrant.

arg(-1-i)
// → (-3/4)*pi
Open in Playground

A negative real number.

arg(-1)
// → pi
Open in Playground

A symbolic imaginary number.

arg(a*i)
// → atan2(a, 0)
Open in Playground

Also called

phase

← Back to Function reference