Functions in complex.c


Table of Contents

  1. Aimag( )
  2. COMplex_Abs( )
  3. COMplex_Add( )
  4. COMplex_Add2( )
  5. COMplex_Cmplx( )
  6. COMplex_Conjg( )
  7. COMplex_Div( )
  8. COMplex_Expon( )
  9. COMplex_Sub( )
  10. COMplex_Mul( )
  11. COMplex_Null( )
  12. Null_CMPLXVector( )
  13. Null_CMPLXMatrix( )
  14. Real( )
  15. Real_Div( )
  16. Real_Mul( )


Aimag( )

Prototype:    double    Aimag( complex z)
Description:     To get the imaginary part of a complex number
Input value: Return value:    the imaginary part of z.

(Click to go back to Table of Contents.)


COMplex_Abs( )

Prototype:    double    COMplex_Abs( complex z)
Description:     To get the Euclid normal of a complex number
Input value: Return value:    Assume z=x+j y, return sqrt(x^2+y^2).

(Click to go back to Table of Contents.)



COMplex_Add( )

Prototype:    complex    COMplex_Add( complex a, complex b)
Description:     To add two complex numbers.
Input value: Return value:     the complex sum of a and b

(Click to go back to Table of Contents.)


COMplex_Add2( )

Prototype:    complex    COMplex_Add2(complex a, complex b, complex c)
Description:     To add three complex variables
Input value: Return value:     the complex sum of a, b and c

(Click to go back to Table of Contents.)



COMplex_Cmplx( )

Prototype:     complex    COMplex_Cmplx(double x , double y);
Description:     To initialize  a complex number.
Input value: Return value:     a complex value equal to x+jy, where j is the imaginary unit.

(Click to go back to Table of Contents.)


COMplex_Conjg( )

Prototype:    complex    COMplex_Conjg( complex z)
Description:     To get the conjungate of a complex number.
Input value: Return value:     The conjugate of z.

(Click to go back to Table of Contents.)
 


COMplex_Div( )

Prototype:    complex    COMplex_Div(complex a, complex b)
Description:     To divide two complex variables
Input value: Return value:     the complex number of  a / b
Subroutines called:     COMplex_Cmplx()

(Click to go back to Table of Contents.)
 



COMplex_Expon( )

Prototype:    complex    COMplex_Expon(double a, complex z)
Description:     To compute the exponential  function z**a.
Input value: Return value:     the exponential value of z**a.
Subroutines called:     COMplex_Cmplx()

(Click to go back to Table of Contents.)


COMplex_Sub( )

Prototype:    complex    COMplex_Sub(complex a, complex b)
Description:     To subtract complex b from complex a
Input value: Return value:    the complex number of  a-b

(Click to go back to Table of Contents.)


COMplex_Mul( )

Prototype:    complex    COMplex_Mul(complex a, complex b)
Description:     To multiple two complex variables
Input value: Return value:     the complex product of a and b.
Subroutines called:     COMplex_Cmplx()

(Click to go back to Table of Contents.)


COMplex_Null( )

Prototype:    complex    COMplex_Null()
Description:     To  initialize a complex number to zero
Input value:    none
Return value:     a complex number equal to zero.

(Click to go back to Table of Contents.)



Null_CMPLXVector( )

Prototype:    void     Null_CMPLXVector( complex *Vec, int LenX)
Description    To initialize a vector of complex type to zero
Input value: Return value:    none

(Click to go back to Table of Contents.)



Null_CMPLXMatrix( )

Prototype:    double    Null_CMPLXMAtrix(complex **Vec, int LenX, int LenY)
Description    To initialize a matrix of complex type to zero.
Input value: Return value:     none

(Click to go back to Table of Contents.)



Real_Div( )

Prototype:    complex    Real_Div(complex z, double a)
Description:    To divide a complex number by a real number.
Input value: Return value:     the complex number of z / a
 
(Click to go back to Table of Contents.)

Real_Mul( )

Prototype:    complex    Real_Mul(double a, complex z)
Description:     To get the product of a real number and a complex number
Input value: Return value:     complex product of a and z
Subroutines called:     COMplex_Cmplx()

(Click to go back to Table of Contents.)