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