voigt

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|.

Reference: Abramowitz&Stegun (1964), formula (7.4.13).

@safe @nogc nothrow
double
voigt
(
double x
,
double sigma
,
double gamma
)

Meta