Callable object computing The imaginary error function \( \displaystyle \mathrm{erfi}(z) = -i/erf(iz)\).
Callable object computing The Dirichlet \( \displaystyle \eta(z) = \sum_0^\infty \frac{(-1)^n}{(n+1)^z}\).
Defined in Header
#include <eve/module/complex.hpp>
{
template< like<complex> T >
T erfi(T z) noexcept;
}
Parameters
Return value
Returns the imaginary error function \( \displaystyle \mathrm{erfi}(z) = -i/erf(iz)\)
#include <eve/module/complex.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft ref = {-0.1, 0.1, 1., 1., -1., 0.000001, 0., 0. };
wide_ft imf = { 0., 0., 0., 2., 2., 0.000002, 2., 0.0};
auto z = eve::as_complex_t<wide_ft>(ref, imf);
auto r = eve::erfi(z);
std::cout
<< "---- simd" << std::endl
<< "<- z = " << z << std::endl
<< "-> erfi(z) = " << r << std::endl
<< "-> erfi(z) = " << rr<< std::endl ;
auto zs = eve::as_complex_t<float>(-1, -5);
auto rs = eve::erfi(zs);
std::cout
<< "---- scalar" << std::endl
<< "<- zs = " << zs << std::endl
<< "-> erfi(zs) = " << rs << std::endl;
return 0;
}
constexpr callable_i_ i
Callable object computing the pure imaginary ( ) value.
Definition: i.hpp:52
constexpr callable_erf_ erf
Computes the error function: or its analytic continuation in the complex plane.
Definition: erf.hpp:65
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65
Defined in Header
#include <eve/module/complex.hpp>
{
template< like<complex> T >
}
constexpr callable_eta_ eta
Callable object computing The imaginary error function .
Definition: eta.hpp:58
Parameters
Return value
Returns the Dirichlet sum \( \sum_0^\infty \frac{(-1)^n}{(n+1)^z}\)
Real version
#include <eve/module/complex.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft xf = { 3.0f, 2.0f, 1.0f, 0.5f};
std::cout
<< "---- simd" << std::endl
<< "<- z = " << xf << std::endl
<<
"-> eta(xf) = " <<
eve::eta(xf) << std::endl;
return 0;
}
Complex version
#include <eve/module/complex.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft ref1 = { 3.0f, 2.0f, 1.0f, 0.5f};
wide_ft imf1 = { 2.0f , -1.0, -5.0, 0.0};
auto zc = eve::as_complex_t<wide_ft>(ref1, imf1);
std::cout
<< "---- simd" << std::endl
<< "<- zc = " << zc << std::endl
<<
"-> eta(zc) = " <<
eve::eta(zc)<< std::endl;
return 0;
}