RTHROOT

Purpose:

Returns the principal Complex rth root of unity.

Syntax:

RTHROOT(r)

r

-

A real.

Returns:

A complex scalar, e2πi/r

Example:

rthroot(2.0)

 

returns mag = 1; angle = 3.14159, 180.

Example:

rthroot(6.9)

 

returns mag = 1; angle = 0.91061, 52.17391.

Remarks:

Returns Complex number in polar form. Use cartesian(rthroot(r)) to see the root in Cartesian form. Use rthroot(r)^n to see the other rth roots of unity.

 

See POLYROOT to find the roots of a polynomial.

See Also:

POLYROOT

ROOTS