Graph Framework
Loading...
Searching...
No Matches
special_functions.hpp File Reference

Implimentations for special functions. More...

#include <iostream>
#include <complex>
#include <cfloat>
#include <cmath>
#include <cstdint>
#include <limits>

Go to the source code of this file.

Namespaces

namespace  special
 Name space for special functions.
 

Typedefs

template<typename T >
using complex_type = std::complex< T >
 Type alias for complex types.
 

Functions

template<typename T >
constexpr complex_type< T > special::i (static_cast< T >(0), static_cast< T >(1))
 I constant.
 
template<typename T >
complex_type< T > special::erfcx (complex_type< T > z)
 Compute erfcx(z) = exp(z^2)*erfz(z)
 
template<typename T >
special::sq (T x)
 x^2
 
template<typename T >
special::w_im_y100 (T x)
 Compute a scaled Dawson integral.
 
template<typename T >
special::isqpi ()
 Define 1.0/sqrt(pi)
 
template<typename T >
special::w_im (T x)
 Compute specal case of w(z) = exp(z^2)*erfz(z).
 
template<typename T >
special::erfcx_y100 (const T y100)
 erfcx(x) = exp(x^2)*erfc(x) function, for real x
 
template<typename T >
special::erfcx (T x)
 erfcx(x) = exp(x^2)*erfc(x) function, for real x
 
template<typename T >
special::sinh_taylor (T x)
 sinh(x)
 
template<typename T >
special::sinc (T x, T sinx)
 sinc(x) = sin(x)/x
 
template<typename T >
complex_type< T > special::w (complex_type< T > z)
 Compute w(z) = exp(z^2)*erfz(z).
 
template<typename T >
complex_type< T > special::taylor (const complex_type< T > z, const T mRe_z2, const T mIm_z2)
 Taylor series.
 
template<typename T >
complex_type< T > special::taylor_erfi (const T x, const T y)
 Taylor erfi series.
 
template<typename T >
complex_type< T > special::erf_complex (const complex_type< T > z)
 Compute the error function erf(z)
 
template<typename T >
complex_type< T > special::erfi (const complex_type< T > z)
 erfi(z) = -i erf(iz)
 

Variables

template<typename T >
constexpr T special::expa2n2 []
 Precomputed table of expa2n2[n-1] = exp(-a2*n*n) for double-precision a2 = 0.26865... in w, below.
 

Detailed Description

Implimentations for special functions.

Special functions are adapted from http://ab-initio.mit.edu/Faddeeva