Complex Operators

<< Click to Display Table of Contents >>

Navigation:  Problem Descriptor Reference > The Elements of a Descriptor > Operators >

Complex Operators

Previous pageReturn to chapter overviewNext page

The following operators perform various transformations on complex quantities.

 

REAL ( complex )        

Extracts the real part of the complex number.        

 

IMAG ( complex )        

Extracts the imaginary part of the complex number.        

 

CABS ( complex )        

Computes the magnitude of the complex number, given by

CABS(complex(x,y)) = sqrt(x^2 + y^2).        

 

CARG ( complex )        

Computes the Argument (or angular component) of the complex number, implemented as CARG(complex(x,y)) = Atan2(y,x).        

 

CEXP ( complex )        

Computes the complex exponential of the complex number, given by

CEXP(complex(x,y)) = exp(x + iy) = exp(x)*(cos(y) + i*sin(y)).        

 

CLOG ( complex )        

Computes the natural logarithm of the complex number, given by

CLOG(complex(x,y)) = ln(x + iy) = ln(sqrt(x^2 + y^2)) + i*arctan(y/x).        

 

CONJ ( complex )        

Returns the complex conjugate of the complex number.        

 

CSQRT ( complex )        

Computes the complex square root of the complex number, given by

CSQRT(complex(x,y)) = complex( sqrt((r + x)/2), sign(y)*sqrt((r - x)/2) )

where r = CABS(x,y).