Functions

arg

Supported By

Syntax

[the] arg of factor

arg ( expression )

Factor and expression yield integers, numbers, or complexes.

Example

put arg(3,4) into angle

Description

The arg function returns the complex argument of its argument.

If the argument is a negative integer or number, pi is returned. If the argument is a positive integer or number, or if the argument is zero, zero is returned.

If the argument is a complex, a complex is returned. The returned complex will have a real part of the angle, in radians, of the passed in complex from the positive x-axis, and an imaginary part of zero.

Note

This function is similar to the atan2 and theta functions, but takes one numeric argument rather than two.

See Also

atan2, theta