cerfi, erfi - imaginary error function
#include <cerf.h>
double _Complex cerfi ( double _Complex z );
double erfi ( double x );
The function cerfi returns an error function rotated in the complex plane, erfi(z) = -i erf(iz).
The function erfi takes a real argument and returns a real result.
Errors are given in units of eps = 2^-53 = 1.1e-16, as relative deviations from high-precision reference values; for complex results, of the modulus.
erfi(x) = exp(x^2) Im w(x) is computed from im_w_of_x(3). The argument x^2 of the exponential is rounded before the exponential is taken, so that the relative error grows like x^2 eps: it stays below 3 eps for |x| < 1 and reaches about 500 eps at |x| = 24. For |x| > 26.64 the result overflows to +-Inf.
cerfi(z) = -i erf(iz) inherits the accuracy of cerf(3): the relative error of the modulus stays below about 1.6 |z|^2 eps + 5 eps, except near the zeros of erfi, the first of which lie at z = +-1.8809 +- 1.4506i, where it is amplified without bound, and close to the origin, for 0.01 < |z| < 0.1 off the coordinate axes, where up to about 120 eps were found.
The implementation of cerfi and erfi is trivially based on the functions cerf(3) and im_w_of_x(3).
Other complex error functions in libcerf: dawson(3), erfcx(3), voigt(3), w_of_z(3).
The real error function comes with recent versions of glibc, as requested by the C99 standard: erf(3).
Homepage: https://jugit.fz-juelich.de/mlz/lib/cerf
Steven G. Johnson, Massachusetts Institute of Technology, wrote this function as part of the MIT Faddeeva package.
Joachim Wuttke, Forschungszentrum Juelich, reorganized the code into a library, and wrote this man page.
Please report bugs to the maintainer:
Joachim Wuttke <j.wuttke@fz-juelich.de>
Copyright (c) 2012 Massachusetts Institute of Technology
Copyright (c) 2013 Forschungszentrum Juelich GmbH
Software: MIT License.
This documentation: Creative Commons Attribution Share Alike.