E.V.E
v2023.02.15

◆ exp_i

eve::exp_i = {}
inlineconstexpr

Callable object computing exp_iinary part of values.

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

Members Functions

Member Effect
operator() the computation of exp(i*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, eve::pi(eve::as(1.0f))};
std::cout
<< "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> exp_i(pf) = " << eve::exp_i(pf) << '\n'
<< "-> exp_i(-i(as<wide_ft())) = " << eve::exp_i(-eve::i(eve::as<wide_ft>())) << '\n';
float xf = (eve::pio_2(eve::as(1.0f)));
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> eve::exp_i(xf) = " << eve::exp_i(xf) << '\n';
return 0;
}
constexpr callable_exp_i_ exp_i
Callable object computing exp_iinary part of values.
Definition: exp_i.hpp:49
constexpr callable_i_ i
Callable object computing the pure imaginary ( ) value.
Definition: i.hpp:52
constexpr callable_pi_ pi
Callable object computing the constant .
Definition: pi.hpp:49
constexpr callable_pio_2_ pio_2
Callable object computing the constant .
Definition: pio_2.hpp:49
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65