E.V.E
v2022.03.00

◆ polar

eve::polar = {}
inlineconstexpr

Callable object computing a complex from its polar representatione.

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

Members Functions

Member Effect
operator() the computation of a complex from a module argument pair

auto operator()(floating_value auto rho, auto theta) const noexcept;
Definition: value.hpp:83

Parameters

rho: the modulus of the complex theta the argument in radian of the complex

Return value

the complex value


Example

#include <eve/module/complex.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft r = { 0.0f, 1.0f, 2.0f, 3.9f};
wide_ft t = { eve::pio_2(eve::as(1.0f)), 0.0f, 1.0f, eve::nan(eve::as(1.0f))};
std::cout
<< "---- simd" << '\n'
<< "<- r = " << r << '\n'
<< "<- t = " << t << '\n'
<< "-> polar(r, t) = " << eve::polar(r, t) << '\n';
std::cout
<< "---- scalar" << '\n'
<< "-> polar(1, pi) = " << eve::polar(1.0, eve::pi(eve::as(1.0))) << '\n';
return 0;
}
constexpr callable_polar_ polar
Callable object computing a complex from its polar representatione.
Definition: polar.hpp:52
constexpr callable_nan_ nan
Computes the IEEE NaN constant.
Definition: nan.hpp:53
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