ComPWA
Common Partial-Wave-Analysis Framework
Faddeeva.hh
Go to the documentation of this file.
1 
7 /* Copyright (c) 2012 Massachusetts Institute of Technology
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining
10  * a copy of this software and associated documentation files (the
11  * "Software"), to deal in the Software without restriction, including
12  * without limitation the rights to use, copy, modify, merge, publish,
13  * distribute, sublicense, and/or sell copies of the Software, and to
14  * permit persons to whom the Software is furnished to do so, subject to
15  * the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be
18  * included in all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27  */
28 
29 /* Available at: http://ab-initio.mit.edu/Faddeeva
30 
31  Header file for Faddeeva.cc; see that file for more information. */
32 
33 #ifndef FADDEEVA_HH
34 #define FADDEEVA_HH 1
35 
36 #include <complex>
37 
38 namespace Faddeeva {
39 
40 // compute w(z) = exp(-z^2) erfc(-iz) [ Faddeeva / scaled complex error func ]
41 extern std::complex<double> w(std::complex<double> z, double relerr = 0);
42 extern double w_im(double x); // special-case code for Im[w(x)] of real x
43 
44 // Various functions that we can compute with the help of w(z)
45 
46 // compute erfcx(z) = exp(z^2) erfc(z)
47 extern std::complex<double> erfcx(std::complex<double> z, double relerr = 0);
48 extern double erfcx(double x); // special case for real x
49 
50 // compute erf(z), the error function of complex arguments
51 extern std::complex<double> erf(std::complex<double> z, double relerr = 0);
52 extern double erf(double x); // special case for real x
53 
54 // compute erfi(z) = -i erf(iz), the imaginary error function
55 extern std::complex<double> erfi(std::complex<double> z, double relerr = 0);
56 extern double erfi(double x); // special case for real x
57 
58 // compute erfc(z) = 1 - erf(z), the complementary error function
59 extern std::complex<double> erfc(std::complex<double> z, double relerr = 0);
60 extern double erfc(double x); // special case for real x
61 
62 // compute Dawson(z) = sqrt(pi)/2 * exp(-z^2) * erfi(z)
63 extern std::complex<double> Dawson(std::complex<double> z, double relerr = 0);
64 extern double Dawson(double x); // special case for real x
65 
66 } // namespace Faddeeva
67 
68 #endif // FADDEEVA_HH
double FADDEEVA_RE() Dawson(double x)
Definition: Faddeeva.cc:463
double FADDEEVA_RE() erfc(double x)
Definition: Faddeeva.cc:418
cmplx FADDEEVA() w(cmplx z, double relerr)
Definition: Faddeeva.cc:668
cmplx FADDEEVA() erfi(cmplx z, double relerr)
Definition: Faddeeva.cc:407
double FADDEEVA() w_im(double x)
Definition: Faddeeva.cc:4004
cmplx FADDEEVA() erfcx(cmplx z, double relerr)
Definition: Faddeeva.cc:284
double FADDEEVA_RE() erf(double x)
Definition: Faddeeva.cc:289