E.V.E  0.1-beta

◆ quadrant

eve::quadrant = {}
inlineconstexpr

Callable object computing the quadrant value.

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

Members Functions

Member Effect
operator() the computation of the quadrant value

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

Parameters

x: real_value.

Return value

return a value of the same type as x containing the quadrant number where x (supposed an integer) lies.

Warning
the input x must be an integral or a flint value.

Supported decorators

no decorators are supported

Example

See it live on Compiler Explorer

#include <eve/function/quadrant.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {10.0f, 9.0f, -3.0f, 1.0f};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "->quadrant(pf) = " << eve::quadrant(pf) << '\n';
float xf = 15.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = = " << xf << '\n'
<< "->quadrant(xf) = " << eve::quadrant(xf) << '\n';
return 0;
}
constexpr callable_quadrant_ quadrant
Callable object computing the quadrant value.
Definition: quadrant.hpp:61
Wrapper for SIMD registers.
Definition: wide.hpp:65