## File: Complex-arithmetic-operators.html

package info (click to toggle)
gsl-ref-html 2.3-1
• area: non-free
• in suites: bullseye, buster, sid
• size: 6,876 kB
• ctags: 4,574
• sloc: makefile: 35
 file content (176 lines) | stat: -rw-r--r-- 9,245 bytes parent folder | download
 `123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176` `````` GNU Scientific Library – Reference Manual: Complex arithmetic operators

5.3 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, 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, 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, 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, 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, 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, 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, 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, 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 iy, 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 iy, 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 iy, 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 iy, z=a/(iy).

Function: gsl_complex gsl_complex_conjugate (gsl_complex z)

This function returns the complex conjugate of the complex number z, 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, 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, -z = (-x) + i(-y).

``````