Is there a GPL library or a piece of code freely available that implements the imaginary error function:
erfi(x)=-i*erf(i*x)
where x
is any complex number (or at least real) and i
is the imaginary unit?
A free/open-source C++ implementation of all of the usual error functions for real and complex arguments, including both erfi and a scaled erfi (to cancel erfi's exponential growth) (the Dawson function), including optimizations for erfi of real arguments, is available at http://ab-initio.mit.edu/Faddeeva
(Note that this implementation is actually used in the upcoming version 0.12 of SciPy, replacing the complex-erf code in earlier versions which had accuracy problems: http://projects.scipy.org/scipy/ticket/1207)
(Unfortunately, evaluating special functions of complex arguments isn't as simple as plugging complex numbers into code for real arguments, which is why the templating in Boost's real-valued erf is of no help here.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With