◆ frac
Callable object computing the fractional part of a value. Required header: Members Functions
Definition: value.hpp:31 Parameters
Return value Returns a value with the same type as In particular:
auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::frac Parameters
Return value A Callable object so that the expression Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/frac.hpp>
#include <eve/constant/inf.hpp>
#include <eve/constant/nan.hpp>
#include <eve/wide.hpp>
#include <iostream>
#include <iomanip>
using wide_ft = eve::wide<float, eve::fixed<8>>;
int main()
{
wide_ft pf = {-1.0f, -1.3f, -0.0f, 0.0f,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
float xf = -327.68f;
std::cout << "---- scalar" << std::setprecision(10) << '\n'
<< "<- xf = " << xf << '\n'
return 0;
}
constexpr callable_frac_ frac Callable object computing the fractional part of a value. Definition: frac.hpp:80 constexpr callable_inf_ inf Callable object computing the infinity ieee value. Definition: inf.hpp:54 |