Computes the nth previous representable element.
{
template< eve::value T, eve::integral_value N >
eve::common_compatible_t<T, U>
prev(T x, N n = 1) noexcept;
}
constexpr callable_prev_ prev
Computes the nth previous representable element.
Definition: prev.hpp:110
Definition: all_of.hpp:22
#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 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