E.V.E
v2022.03.00

◆ exp_ipi

eve::exp_ipi = {}
inlineconstexpr

Callable object computing exp_ipiinary part of values.

Required header: #include <eve/module/complex.hpp>

Members Functions

Member Effect
operator() the computation of exp(i*pi*x)

auto operator()(value auto x) const noexcept;
Definition: value.hpp:31

Parameters

x: value.

Return value a complex value

Example

#include <eve/module/complex.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = { 0.0f, 1.0f, -1.0f, 0.5f};
std::cout
<< "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> exp_ipi(pf) = " << eve::exp_ipi(pf) << '\n'
<< "-> exp_ipi(-i(as<wide_ft())) = " << eve::exp_ipi(-eve::i(eve::as<wide_ft>())) << '\n';
float xf = 1.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> eve::exp_ipi(xf) = " << eve::exp_ipi(xf) << '\n';
return 0;
}
constexpr callable_exp_ipi_ exp_ipi
Callable object computing exp_ipiinary part of values.
Definition: exp_ipi.hpp:48
constexpr callable_i_ i
Callable object computing the pure imaginary ( ) value.
Definition: i.hpp:51
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65