Contains functions that are related to the complex error function of complex argument.
Citation:
S. G. Johnson, J. Wuttke: libcerf, numeric library for complex error functions, see .
Most function evaluations in this library rely on Faddeeva's function w(z). This function has been reimplemented from scratch by Steven G.Johnson; project web site http://ab-initio.mit.edu/Faddeeva. The implementation partly relies on algorithms from the following publications:
References:
Walter Gautschi, Efficient computation of the complex error function, SIAM J. Numer. Anal. 7, 187 (1970).
G. P. M. Poppe and C. M. J. Wijers, More efficient computation of the complex error function, ACM Trans. Math. Soft. 16, 38 (1990).
Mofreh R. Zaghloul and Ahmed N. Ali, Algorithm 916: Computing the Faddeyeva and Voigt Functions, ACM Trans. Math. Soft. 38, 15 (2011).
Constructor | Description |
Full Usage:
ComplexErrorFunctionRelated()
|
|
Static member | Description | ||
|
Dawson's integral D(z) = sqrt(pi)/2 * exp(-z^2) * erfi(z).
|
||
|
Complex error function.
|
||
|
The complex complementary error function cerfc(z) = 1 - cerf(z).
|
||
|
The underflow-compensating function cerfcx(z) = exp(z^2)*cerfc(z).
|
||
|
The imaginary error function cerfi(z) = -i cerf(iz).
|
||
Full Usage:
ComplexErrorFunctionRelated.Dawson(x)
Parameters:
float
-
The real argument x.
Returns: float
Value of Dawson's integral D(x) = sqrt(pi)/2 * exp(-x^2) * erfi(x) for real values.
|
Dawson's integral D(x) = sqrt(pi)/2 * exp(-x^2) * erfi(x) for real values.
|
||
Full Usage:
ComplexErrorFunctionRelated.Erfcx(x)
Parameters:
float
-
The real argument x.
Returns: float
Value of the underflow-compensating function erfcx(z) = exp(x^2)*erfc(x).
|
The underflow-compensating function erfcx(x) = exp(x^2)*erfc(x) for real arguments.
|
||
Full Usage:
ComplexErrorFunctionRelated.Erfi(x)
Parameters:
float
-
The real argument x.
Returns: float
Value of the imaginary error function erfi(x) = -i cerf(ix).
|
The imaginary error function erfi(x) = -i cerf(ix).
|
||
Full Usage:
ComplexErrorFunctionRelated.Im_w_of_z(x, y)
Parameters:
float
-
The real part of the complex argument z.
y : float
-
The imaginary part of the complex argument z.
Returns: float
Imaginary part of Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz).
|
Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz), returning the purely imaginary result as a real number.
|
||
Full Usage:
ComplexErrorFunctionRelated.Re_w_of_z(x, y)
Parameters:
float
-
The real part of the complex argument z.
y : float
-
The imaginary part of the complex argument z.
Returns: float
Real part of Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz).
|
Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz), returning the real part of the result as a real number.
|
||
Full Usage:
ComplexErrorFunctionRelated.Voigt(x, sigma, gamma)
Parameters:
float
-
The real argument x.
sigma : float
-
The parameter sigma (of the Gaussian).
gamma : float
-
The parameter gamma (of the Lorentzian).
Returns: float
The value of the Voigt function, a convolution of a Gaussian and a Lorentzian probability density function.
|
The convolution of a Gaussian and a Lorentzian probability density function.
|
||
Full Usage:
ComplexErrorFunctionRelated.VoigtHalfWidthHalfMaximum(sigma, gamma)
Parameters:
float
-
The parameter sigma (of the Gaussian).
gamma : float
-
The parameter gamma (of the Lorentzian).
Returns: float
The half width at half maximum of the Voigt profile, see ComplexErrorFunctionRelated.Voigt.
|
|
||
Full Usage:
ComplexErrorFunctionRelated.VoigtHalfWidthHalfMaximumApproximation(sigma, gamma)
Parameters:
float
-
The parameter sigma (of the Gaussian).
gamma : float
-
The parameter gamma (of the Lorentzian).
Returns: float
The half width at half maximum of the Voigt profile, see ComplexErrorFunctionRelated.Voigt.
|
An approximation formula for the half width at half maximum of the ComplexErrorFunctionRelated.Voigt profile. The maximal relative error is 0.0216%. The error is vanishing in the limiting cases sigma>>gamma and gamma>>sigma.
References: [1] Olivero, Longbothum, Journal of Quantitative Spectroscopy and Radiative Transfer, 1977, 17:233 D. Lellinger: The constant C1 was calculated from C2 in order to ensure asymptotic correct behavior. C2 was chosen so that the maximum relative error is symmetrically around zero.
|
||
|
Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz).
|