Data Structures | Functions

src/complex.h File Reference

STATUS: stable complex More...

#include "definitions.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Complex

Functions

Complex complex (double re, double im)
 constructor.
double complex_abs (Complex a)
 absolute value of complex number.
Complex complex_add (Complex a, Complex b)
 complex addition.
Complex complex_add_dbl (Complex a, double b)
Complex complex_bilinear_transform (Complex pz)
 bilinear transform of a complex number.
Complex complex_conj (Complex a)
 complex conjugate.
Complex complex_div (Complex a, Complex b)
 complex division.
Complex complex_exp (Complex a)
 exponential function of a complex number.
Complex complex_mul (Complex a, Complex b)
 complex multiplication.
Complex complex_mul_double (Complex a, double b)
 complex multiplication with real number.
Complex complex_neg (Complex a)
 complex negate.
Complex complex_sqrt (Complex x)
 complex square root.
Complex complex_sub (Complex a, Complex b)
 complex subtraction.

Detailed Description

STATUS: stable complex

Complex Numbers.

Definition in file complex.h.


Function Documentation

Complex complex ( double  re,
double  im 
)

constructor.

Parameters:
re real part
im imaginary part
Returns:
Complex struct

Definition at line 30 of file complex.c.

double complex_abs ( Complex  a  ) 

absolute value of complex number.

Definition at line 72 of file complex.c.

Complex complex_add ( Complex  a,
Complex  b 
)

complex addition.

Definition at line 39 of file complex.c.

Complex complex_add_dbl ( Complex  a,
double  b 
)
Complex complex_bilinear_transform ( Complex  pz  ) 

bilinear transform of a complex number.

Definition at line 131 of file complex.c.

Complex complex_conj ( Complex  a  ) 

complex conjugate.

Definition at line 92 of file complex.c.

Complex complex_div ( Complex  a,
Complex  b 
)

complex division.

this is

\[ \frac{(a + bi)}{(c + di)} = \left({ac + bd \over c^2 + d^2}\right) + \left( {bc - ad \over c^2 + d^2} \right)i \]

Definition at line 122 of file complex.c.

Complex complex_exp ( Complex  a  ) 

exponential function of a complex number.

this is

\[ \exp( a+bi ) = \exp( a )\cdot (\cos b + i\sin b ) \]

Definition at line 83 of file complex.c.

Complex complex_mul ( Complex  a,
Complex  b 
)

complex multiplication.

Definition at line 55 of file complex.c.

Complex complex_mul_double ( Complex  a,
double  b 
)

complex multiplication with real number.

Definition at line 64 of file complex.c.

Complex complex_neg ( Complex  a  ) 

complex negate.

Definition at line 99 of file complex.c.

Complex complex_sqrt ( Complex  x  ) 

complex square root.

Definition at line 107 of file complex.c.

Complex complex_sub ( Complex  a,
Complex  b 
)

complex subtraction.

Definition at line 47 of file complex.c.