E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
next
auto eve::next =
functor
<next_t>
inline
constexpr
Header file
#include <eve/module/core.hpp>
Callable Signatures
namespace
eve
{
// Regular overloads
constexpr
auto
next
(
value
auto
x)
noexcept
;
// 1
constexpr
auto
next
(
value
auto
x,
integral_value
auto
n)
noexcept
;
// 2
// Lanes masking
constexpr
auto
next
[
conditional_expr
auto
c](
/* any of the above overloads */
)
noexcept
;
// 3
constexpr
auto
next
[
logical_value
auto
m](
/* any of the above overloads */
)
noexcept
;
// 3
// Exclusive Semantic options - Only one of those can be set at once
constexpr
auto
next
[pedantic](
/* any of the above overloads */
)
noexcept
;
// 4
constexpr
auto
next
[saturated ](
/* any of the above overloads */
)
noexcept
;
// 5
constexpr
auto
next
[raw](
value
auto
x)
noexcept
;
// 6
}
eve::conditional_expr
Specifies that a type is a Conditional Expression.
Definition
conditional.hpp:28
eve::integral_value
The concept integral_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition
value.hpp:51
eve::logical_value
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition
value.hpp:134
eve::value
The concept value<T> is satisfied if and only if T satisfies either eve::scalar_value or eve::simd_va...
Definition
value.hpp:34
eve::next
constexpr auto next
strict_elementwise_callable computing the nth next representable element
Definition
next.hpp:107
eve
EVE Main Namespace.
Definition
abi.hpp:19
Parameters
x
:
floating argument
.
n
:
integral value argument
.
c
:
Conditional expression
masking the operation.
m
:
Logical value
masking the operation.
Return value
the least representable value greater than
x
is returned.
the nth representable value greater than
x
is returned. If
n
is zero returns
x
.
The operation is performed conditionnaly
if
x
is floating the call with mzero returns zero
ensures that the input is never greater than the result of the call.
works only if inputs are normal numbers (this excludes floating zeroes, denormals or not finite) the option has no influence on the two parameters calls
If
n
is zero returns
x
.
Example
// revision 0
#include <eve/module/core.hpp>
#include <iostream>
#include <iomanip>
int
main()
{
eve::wide
wf0 = {-0.0f, 2.0f,
eve::eps
(
eve::as<float>
()), 0.0f, 30.0f,eve::mindenormal(
eve::as<float>
()),
eve::inf
(
eve::as<float>
()),
eve::nan
(
eve::as<float>
())};
eve::wide
wi0 = {-1, 2, -3, -4, 327654, 32765, 32766, 32767 };
eve::wide
wu0 = {0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << std::hexfloat;
std::cout <<
"<- wf0 = "
<< wf0 <<
"\n"
;
std::cout <<
"<- wi0 = "
<< wi0 <<
"\n"
;
std::cout <<
"<- wu0 = "
<< wu0 <<
"\n"
;
std::cout <<
"-> next(wf0) = "
<<
eve::next
(wf0) <<
"\n"
;
std::cout <<
"-> next(wf0, wi1) = "
<<
eve::next
(wf0, 2) <<
"\n"
;
std::cout <<
"-> next[ignore_last(2)](wf0) = "
<<
eve::next
[
eve::ignore_last
(2)](wf0) <<
"\n"
;
std::cout <<
"-> next[wf0 != 0](wf0) = "
<<
eve::next
[wf0 != 0](wf0) <<
"\n"
;
std::cout <<
"-> next[pedantic](wf0) = "
<<
eve::next
[eve::pedantic](wf0) <<
"\n"
;
std::cout <<
"-> next[saturated ](wi0) = "
<<
eve::next
[eve::saturated ](wi0) <<
"\n"
;
std::cout <<
"-> next(wu0) = "
<<
eve::next
(wu0) <<
"\n"
;
std::cout <<
"-> next(wi0) = "
<<
eve::next
(wi0) <<
"\n"
;
std::cout <<
"-> next(wi0, wu0) = "
<<
eve::next
(wi0, wu0) <<
"\n"
;
}
eve::nan
constexpr auto nan
Computes the IEEE quiet NaN constant.
Definition
nan.hpp:67
eve::eps
constexpr auto eps
Computes a constant to the machine epsilon.
Definition
eps.hpp:74
eve::inf
constexpr auto inf
Computes the infinity ieee value.
Definition
inf.hpp:67
eve::as
Lightweight type-wrapper.
Definition
as.hpp:29
eve::ignore_last
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition
conditional.hpp:353
eve::wide
Wrapper for SIMD registers.
Definition
wide.hpp:94
eve