Computes the nth previous representable element.
{
template< eve::value T, eve::integral_value N >
}
constexpr callable_prev_ prev
Computes the nth previous representable element.
Definition: prev.hpp:110
typename eve::detail::common_value_impl< void, Ts... >::type common_value_t
Computes the SIMD-compatible common type between all Ts.
Definition: common_value.hpp:50
#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
#include <iomanip>
int main()
{
wide_it
pi = {-1, 2, -3, -32};
std::cout << "---- simd" << '\n'
<< "<- pf =" << std::setprecision(12) << pf << '\n'
<<
"<- pi =" <<
pi <<
'\n'
float xf = 0.0f;
std::int16_t xi = -3;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<<
"-> prev(xf, 3) = " <<
eve::prev(xf, 3) <<
'\n'
<< "<- xi = " << xi << '\n'
<<
"-> prev(xi) = " <<
eve::prev(xi) <<
'\n';
return 0;
}
constexpr callable_eps_ eps
Computes the the machine epsilon.
Definition: eps.hpp:63
constexpr pedantic_type const pedantic
Higher-order Callable Object imbuing more standard semantic onto other Callable Objects.
Definition: pedantic.hpp:56
constexpr callable_pi_ pi
Callable object computing the constant .
Definition: pi.hpp:49
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65