r>c command
This command takes two real numbers as arguments, and returns a complex number whose real part is the level two argument and whose imaginary part is the level one argument.
Examples:
> pi 1 exp
[ 2] 3.14159265358979
[ 1] 2.71828182845905
> r>c
[ 1] (3.14159265358979,
2.71828182845905)
re>c command
This command takes a real number as argument, and returns a complex number whose real part is its argument and whose imaginary part is zero.
Examples:
> pi
[ 1] 3.14159265358979
> re>c
[ 1] (3.14159265358979,0)
im>c command
This command takes a real number as argument, and returns a complex number whose real part is zero and whose imaginary part is its argument.
Examples:
> pi
[ 1] 3.14159265358979
> im>c
[ 1] (0,3.14159265358979)
c>r command
This command takes a complex number as argument and returns two real numbers, representing its real and imaginary parts.
Examples:
> (3, -4)
[ 1] (3,-4)
> c>r
[ 2] 3
[ 1] -4
re command
This command takes a complex number as argument and returns a real number representing its real part.
Examples:
> (3, -4)
[ 1] (3,-4)
> re
[ 1] 3
im command
This command takes a complex number as argument and returns a real number representing its imaginary part.
Examples:
> (3, -4)
[ 1] (3,-4)
> im
[ 1] -4
conj command
This command returns the conjugate of its argument.
> (3, -4)
[ 1] (3,-4)
> conj
[ 1] (3,4)
arg command
This command returns the argument of a complex number, that is, it's angle when represented in polar form.
Examples:
> set anglemode deg
> (4 4)
[ 1] (4,4)
> arg
[ 1] 45
> (-2 4)
[ 2] 45
[ 1] (-2,4)
> arg
[ 2] 45
[ 1] 116.565051177078