|
SDDS ToolKit Programs and Libraries for C and Python
|
Implementation of complex number functions.
Definition in file complex.cc.
#include <complex>#include "mdb.h"Go to the source code of this file.
Functions | |
| std::complex< double > | complexErf (std::complex< double > z, long *flag) |
| Computes the complex error function of a given complex number. | |
| std::complex< double > | cexpi (double p) |
| Computes the complex exponential of an imaginary number. | |
| std::complex< double > | cipowr (std::complex< double > a, int n) |
| Raises a complex number to an integer power. | |
| void | complex_multiply (double *r0, double *i0, double r1, double i1, double r2, double i2) |
| Multiplies two complex numbers. | |
| void | complex_divide (double *r0, double *i0, double r1, double i1, double r2, double i2, double threshold) |
| Divides two complex numbers. | |
| std::complex< double > cexpi | ( | double | p | ) |
Computes the complex exponential of an imaginary number.
| p | The real number representing the imaginary part. |
Definition at line 43 of file complex.cc.
| std::complex< double > cipowr | ( | std::complex< double > | a, |
| int | n ) |
Raises a complex number to an integer power.
| a | The base complex number. |
| n | The exponent (integer). |
Definition at line 56 of file complex.cc.
| void complex_divide | ( | double * | r0, |
| double * | i0, | ||
| double | r1, | ||
| double | i1, | ||
| double | r2, | ||
| double | i2, | ||
| double | threshold ) |
Divides two complex numbers.
| r0 | Pointer to store the real part of the result. |
| i0 | Pointer to store the imaginary part of the result. |
| r1 | Real part of the numerator complex number. |
| i1 | Imaginary part of the numerator complex number. |
| r2 | Real part of the denominator complex number. |
| i2 | Imaginary part of the denominator complex number. |
| threshold | The threshold to prevent division by very small numbers. |
Definition at line 105 of file complex.cc.
| void complex_multiply | ( | double * | r0, |
| double * | i0, | ||
| double | r1, | ||
| double | i1, | ||
| double | r2, | ||
| double | i2 ) |
Multiplies two complex numbers.
| r0 | Pointer to store the real part of the result. |
| i0 | Pointer to store the imaginary part of the result. |
| r1 | Real part of the first complex number. |
| i1 | Imaginary part of the first complex number. |
| r2 | Real part of the second complex number. |
| i2 | Imaginary part of the second complex number. |
Definition at line 81 of file complex.cc.
| std::complex< double > complexErf | ( | std::complex< double > | z, |
| long * | flag ) |
Computes the complex error function of a given complex number.
| z | The complex number input. |
| flag | Pointer to a flag variable to store computation status. |
Definition at line 26 of file complex.cc.