libcerf.err_fcts

Computate Dawson, Voigt, and several error functions, based on erfcx, im_w_of_x, w_of_z as implemented in separate files.

Members

Functions

cdawson
Complex!double cdawson(Complex!double z)

Compute Dawson(z) = sqrt(pi)/2 * exp(-z^2) * erfi(z), Dawson's integral for a complex argument, using w_of_z except for certain regions.

cerf
Complex!double cerf(Complex!double z)

Compute erf(z), the complex error function, using w_of_z except for certain regions.

cerfc
Complex!double cerfc(Complex!double z)

Compute erfc(z) = 1 - erf(z), the complex complementary error function, using w_of_z except for certain regions.

cerfcx
Complex!double cerfcx(Complex!double z)

Compute erfcx(z) = exp(z^2) erfc(z), the complex underflow-compensated complementary error function, trivially related to Faddeeva's w_of_z.

cerfi
Complex!double cerfi(Complex!double z)

Compute erfi(z) = -i erf(iz), the rotated complex error function.

dawson
double dawson(double x)

Compute dawson(x) = sqrt(pi)/2 * exp(-x^2) * erfi(x), Dawson's integral for a real argument.

erfi
double erfi(double x)

Compute erfi(x) = -i erf(ix), the imaginary error function.

voigt
double voigt(double x, double sigma, double gamma)

Compute Voigt's convolution of a Gaussian G(x,sigma) = 1/sqrt(2*pi)/|sigma| * exp(-x^2/2/sigma^2) and a Lorentzian L(x,gamma) = |gamma| / pi / ( x^2 + gamma^2 ), namely voigt(x,sigma,gamma) = \int_{-infty}^{infty} dx' G(x',sigma) L(x-x',gamma) using the relation voigt(x,sigma,gamma) = Re{ w(z) } / sqrt(2*pi) / |sigma| with z = (x+i*|gamma|) / sqrt(2) / |sigma|.

Meta

Authors

Steven G. Johnson, core author; Joachim Wuttke, C package maintainer; Ilya Yaroshenko, D package maintainer

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.