E.V.E  0.1-beta

◆ twopi

eve::twopi = {}
inlineconstexpr

Callable object computing the \(2\pi\) value.

Required header: #include <eve/function/twopi.hpp>

Member Effect
operator() Computes the twopi constant

tempate < floating_value T > T operator()( as<T> const & t) const noexcept;
Lightweight type-wrapper.
Definition: as.hpp:29

Parameters

t: Type wrapper instance embedding the type of the constant.

Return value

eve::twopi(as<T>()) is semantically equivalent to 8*eveatan(T(1))


Example

See it live on Compiler Explorer

#include <eve/constant/twopi.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float>;
int main()
{
wide_ft wxf;
std::cout << "---- simd" << std::endl
<< "-> twopi(as<wide_ft>()) = " << eve::twopi(eve::as<wide_ft>()) << std::endl
<< "-> twopi(as(wxf)) = " << eve::twopi(eve::as(wxf)) << std::endl;
double xf;
std::cout << "---- scalar" << std::endl
<< "-> twopi(as<float>()) = " << eve::twopi(eve::as(float())) << std::endl
<< "-> twopi(as<xf)) = " << eve::twopi(eve::as(xf)) << std::endl;
return 0;
}
constexpr callable_twopi_ twopi
Callable object computing the value.
Definition: twopi.hpp:53
Wrapper for SIMD registers.
Definition: wide.hpp:65