Complex Error Function C
Contents |
toolboxes, and other File Exchange content using Add-On Explorer in MATLAB. » Watch video Highlights from Faddeeva Package: complex error functions Faddeeva_build.m Faddeeva_Dawson.m Faddeeva_erf.m Faddeeva_erfc.m Faddeeva_erfcx.m Faddeeva_erfi.m Faddeeva_w.m View all files Join the 15-year
Complex Error Function Matlab
community celebration. Play games and win prizes! » Learn more 4.75 4.8 | error function of complex argument 4 ratings Rate this file 28 Downloads (last 30 days) File Size: 50.1 KB File ID: #38787 Version: 1.5 complex gamma function Faddeeva Package: complex error functions by Steven G. Johnson Steven G. Johnson (view profile) 1 file 28 downloads 4.75 26 Oct 2012 (Updated 17 Dec 2012) C++ MEX plugins to compute error
Error Function Values
functions (erf, erfc, erfi, erfcx, Faddeeva, ...) of complex args | Watch this File File Information Description C++ source code for compiled plugins (MEX files) to compute various error functions for complex arguments: ** Faddeeva_erf(z) -- the error function ** Faddeeva_erfc(z) = 1 - erf(z) -- complementary error function ** Faddeeva_erfi(z) = -i erf(iz) -- imaginary error function ** Faddeeva_erfcx(z) = exp(z^2) erfc(z) -- scaled complementary
Complex Normal Distribution
error function ** Faddeeva_w(z) = exp(-z^2) erfc(-iz) -- Faddeeva function ** Faddeeva_Dawson(z) = 0.5 sqrt(pi) exp(-z^2) erfi(z) -- Dawson function From e.g. the Faddeeva function, one can also obtain the Voigt functions and other related functions. Assuming you have a C++ compiler (and have configured it in MATLAB with mex -setup), compile by running the included Faddeeva_build.m script in MATLAB: Faddeeva_build All of the functions have usage of the form: w = Faddeeva_w(z) or optionally Faddeeva_w(z, relerr), where relerr is a desired relative error (default: machine precision). z may be an array or matrix of complex or real numbers. This code may also be downloaded from http://ab-initio.mit.edu/Faddeeva along with documentation and other versions. As described in the source code, this implementation uses a combination of algorithms for the Faddeeva function: a continued-fraction expansion for large |z| [similar to G. P. M. Poppe and C. M. J. Wijers, "More efficient computation of the complex error function," ACM Trans. Math. Soft. 16 (1), pp. 38–46 (1990)], and a completely different algorithm for smaller |z| [Mofreh R. Zaghloul and Ahmed N. Ali, "Algorithm 916: Computing the Faddeyeva and Voigt Functions," ACM Trans. Math. Soft. 38 (2), 15 (2011
arguments. In particular, we provide: w, the Faddeeva function , where erfc is the complementary error function. erf, the error function erfc, the complementary error complex gaussian function erfcx, the scaled complementary error function erfi, the imaginary error function
Complementary Error Function
Dawson, the Dawson function Given the Faddeeva function w(z) and the other complex error functions, one can also easily inverse error function compute Voigt functions, Fresnel integrals, and similar related functions as well. In benchmarks of our code, we find that it is comparable to or faster than most competing software for https://www.mathworks.com/matlabcentral/fileexchange/38787-faddeeva-package--complex-error-functions these functions in the complex plane (but we also have special-case optimizations for purely real or imaginary arguments), and we find that the accuracy is typically at at least 13 significant digits in both the real and imaginary parts. Because all of the algorithms are based on algorithms for the Faddeeva function, we call this the Faddeeva Package. Contents 1 Download http://ab-initio.mit.edu/wiki/index.php/Faddeeva_Package 2 Usage 3 Wrappers: C, Matlab, GNU Octave, Python, R, Scilab, Julia 4 Algorithms 5 Test program 6 License [edit]Download Download the source code from: http://ab-initio.mit.edu/Faddeeva.cc and http://ab-initio.mit.edu/Faddeeva.hh (updated 12 May 2015) See also below for wrappers to call the Faddeeva package from other languages. This code has also been packaged into the libcerf and openlibm libraries. [edit] Usage To use the code, include the Faddeeva.hh header file: #include "Faddeeva.hh" and compile and link the Faddeeva.cc source code. You can then call various functions. For example: extern std::complex
// additional overloads for integral http://www.cplusplus.com/reference/cmath/erf/ types Compute error function Returns the error function value http://www.kurims.kyoto-u.ac.jp/~ooura/gamerf.html for x. Header
2
3
4
5
6
7
8
9
10
11
12
/* erf example */ #include