◆ rempio2
Callable object computing the rempio2 value. Required header: Members Functions
template< floating_value T> auto operator()( T x ) const noexcept;
Parameters Return value A tuple consisting of an flint value designing the quadrant and two floating values of type Supported decoratorsno decorators are supported ExampleSee it live on Compiler Explorer #include <eve/function/rempio2.hpp>
#include <eve/wide.hpp>
#include <eve/constant/pi.hpp>
#include <iostream>
using wide_ft = eve::wide<float, eve::fixed<8>>;
int main()
{
wide_ft pf = {-1.0f, 0.0f, 367.0f, -1005600.0f, eve::pi(eve::as<float>())/8,
auto [n, x, dx] = eve::rempio2(pf);
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> rempio2(pf) = [" << '\n'
<< " " << n << ", \n"
<< " " << x << '\n'
<< " " << dx << '\n'
<< " ]\n";
float xf = 2.3;
auto [sn, sx, sdx] = eve::rempio2(xf);
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> rempio2(xf) = [" << sn << ", " << sx << ", " << sdx << "]\n";
return 0;
}
constexpr callable_rempio2_ rempio2 Callable object computing the rempio2 value. Definition: rempio2.hpp:75 |