Go to the first, previous, next, last section, table of contents.

Complex arithmetic operators

Function: gsl_complex gsl_complex_add (gsl_complex a, gsl_complex b)
This function returns the sum of the complex numbers a and b, @math{z=a+b}.

Function: gsl_complex gsl_complex_sub (gsl_complex a, gsl_complex b)
This function returns the difference of the complex numbers a and b, @math{z=a-b}.

Function: gsl_complex gsl_complex_mul (gsl_complex a, gsl_complex b)
This function returns the product of the complex numbers a and b, @math{z=ab}.

Function: gsl_complex gsl_complex_div (gsl_complex a, gsl_complex b)
This function returns the quotient of the complex numbers a and b, @math{z=a/b}.

Function: gsl_complex gsl_complex_add_real (gsl_complex a, double x)
This function returns the sum of the complex number a and the real number x, @math{z=a+x}.

Function: gsl_complex gsl_complex_sub_real (gsl_complex a, double x)
This function returns the difference of the complex number a and the real number x, @math{z=a-x}.

Function: gsl_complex gsl_complex_mul_real (gsl_complex a, double x)
This function returns the product of the complex number a and the real number x, @math{z=ax}.

Function: gsl_complex gsl_complex_div_real (gsl_complex a, double x)
This function returns the quotient of the complex number a and the real number x, @math{z=a/x}.

Function: gsl_complex gsl_complex_add_imag (gsl_complex a, double y)
This function returns the sum of the complex number a and the imaginary number @math{i}y, @math{z=a+iy}.

Function: gsl_complex gsl_complex_sub_imag (gsl_complex a, double y)
This function returns the difference of the complex number a and the imaginary number @math{i}y, @math{z=a-iy}.

Function: gsl_complex gsl_complex_mul_imag (gsl_complex a, double y)
This function returns the product of the complex number a and the imaginary number @math{i}y, @math{z=a*(iy)}.

Function: gsl_complex gsl_complex_div_imag (gsl_complex a, double y)
This function returns the quotient of the complex number a and the imaginary number @math{i}y, @math{z=a/(iy)}.

Function: gsl_complex gsl_complex_conjugate (gsl_complex z)
This function returns the complex conjugate of the complex number z, @math{z^* = x - i y}.

Function: gsl_complex gsl_complex_inverse (gsl_complex z)
This function returns the inverse, or reciprocal, of the complex number z, @math{1/z = (x - i y)/(x^2 + y^2)}.

Function: gsl_complex gsl_complex_negative (gsl_complex z)
This function returns the negative of the complex number z, @math{-z = (-x) + i(-y)}.


Go to the first, previous, next, last section, table of contents.