◆ ulpdist
Callable object computing the ulpdistt operation. Required header: Members Functions
template< value T, value U > auto operator()( T x, U y ) const noexcept requires compatible< T, U >;
Parameters
Return value computes elementwise the 'units in the last place' distance betwween
Supported decoratorsno decorators are supported ExampleSee it live on Compiler Explorer #include <eve/function/ulpdist.hpp>
#include <eve/constant/eps.hpp>
#include <eve/constant/inf.hpp>
#include <eve/constant/smallestposval.hpp>
#include <eve/wide.hpp>
#include <iostream>
#include <iomanip>
int main()
{
using w_t = eve::wide<float, eve::fixed<4>>;
std::cout << "---- simd" << std::setprecision(9) << '\n'
<< " <- qi = " << qi << '\n'
std::uint32_t xi = 3, yi = 7;
std::cout << "---- scalar" << '\n'
<< " xi = " << xi << '\n'
<< " yi = " << yi << '\n'
return 0;
}
constexpr callable_eps_ eps Callable object computing the machine epsilon. Definition: eps.hpp:60 constexpr callable_smallestposval_ smallestposval Callable object computing the smallest normal positive value. Definition: smallestposval.hpp:56 constexpr callable_inf_ inf Callable object computing the infinity ieee value. Definition: inf.hpp:54 constexpr callable_ulpdist_ ulpdist Callable object computing the ulpdistt operation. Definition: ulpdist.hpp:63 |