<p>A program in language C for the complex error function (aka the Faddeeva function) that can be run from Mathematica is also available in <a href="http://arxiv.org/pdf/1407.0748v1.pdf" rel="nofollow">RooFit</a>. Read the article by <a href="http://arxiv.org/pdf/1407.0748v1.pdf" rel="nofollow">Karbach <em>et al.</em> arXiv:1407.0748</a> for more information.</p>
Complex Error Function in Mathematica
<p>The <a href="http://en.wikipedia.org/wiki/Error_function" rel="nofollow">complex error function</a> w(z) is defined as <code>e^(-x^2) erfc(-ix)</code>. The problem with using w(z) as defined above is that the erfc tends to explode out for larger x (complemented by the exponential going to 0 so everything stays small), so that Mathematica reverts to arbitrary precision calculations that make life VERY slow. The function is used in implementing the voigt profile - a line shape commonly used in spectroscopy and other related areas. Right now I'm reverting to calculating the lineshape once and using an interpolation to speed things up, however this doesn't let me alter the parameters of the lineshape (or fit to them) easily. </p>

<p>scipy has a nice and fast implementation of w(z) as <code>scipy.special.wofz</code>, and I was wondering if there is an equivalent in Mathematica.</p>