E.V.E
v2023.02.15
Loading...
Searching...
No Matches

Detailed Description

Operations returning logical values

Mind that in SIMD context these functions DO NOT return boolean but logical values that is an internal representation of a vector of truth values that can be handled by the function of the previous section logical operations).

The set of functions is quite exhaustive. Peculiarly all comparison are treated with their negations and decorations as sometime architectures provide specific intrinsics and also because floating Nan values must be taken into account more easily.

  • With numeric decorator, Nan never wins against a definite value in a comparison.
  • pedantic try to mimic the corresponding standard function behaviour.
  • almost and definitely allow a fuzzy treatment of comparisons.

Supplementary comparisons functions take the bit of sign of zero into account, namely is_eqpz, is_eqmz, is_negative, is_positive

Variables

constexpr auto eve::compare_absolute = functor<compare_absolute_t>
 elementwise callable returning a logical true if and only if the absolute value of the first parameters satisfy the predicate parameters.
constexpr auto eve::is_bit_equal = functor<is_bit_equal_t>
 elementwise callable returning a logical true if and only if the element bits are all equal.
constexpr auto eve::is_denormal = functor<is_denormal_t>
 elementwise callable returning a logical true if and only if the element value is denormal
constexpr auto eve::is_eqmz = functor<is_eqmz_t>
 elementwise callable returning a logical true if and only if the element value is a floating zero with its sign bit set (mzero).
constexpr auto eve::is_eqpz = functor<is_eqpz_t>
 elementwise callable returning a logical true if and only if the element value is a floating zero with its sign bit unset.
constexpr auto eve::is_equal = functor<is_equal_t>
 elementwise callable returning a logical true if and only if the element values are equal.
constexpr auto eve::is_eqz = functor<is_eqz_t>
 elementwise callable returning a logical true if and only if the element value is zero. This includes both positive and negative zero for floating point values.
constexpr auto eve::is_even = functor<is_even_t>
 elementwise callable returning a logical true if and only if the element value is even.
constexpr auto eve::is_finite = functor<is_finite_t>
 elementwise callable returning a logical true if and only if the element is a finite value
constexpr auto eve::is_flint = functor<is_flint_t>
 elementwise callable returning a logical true if and only if the element value is a floating value representing an integer
constexpr auto eve::is_gez = functor<is_gez_t>
 elementwise callable returning a logical true if and only if the element value is greater or equal to 0.
constexpr auto eve::is_greater = functor<is_greater_t>
 elementwise callable returning a logical true if and only if the element value of the first parameter is greater than the second one.
constexpr auto eve::is_greater_equal = functor<is_greater_equal_t>
 elementwise callable returning a logical true if and only if the element value of the first parameter is greater or equal to the second one.
constexpr auto eve::is_gtz = functor<is_gtz_t>
 elementwise callable returning a logical true if and only if the element value is greater than 0.
constexpr auto eve::is_infinite = functor<is_infinite_t>
 elementwise callable returning a logical true if and only if the element is an infinite value
constexpr auto eve::is_less = functor<is_less_t>
 elementwise callable returning a logical true if and only if the element value of the first parameter is less than the second one.
constexpr auto eve::is_less_equal = functor<is_less_equal_t>
 elementwise callable returning a logical true if and only if the element value of the first parameter is less or equal to the second one.
constexpr auto eve::is_lessgreater = functor<is_lessgreater_t>
 elementwise callable returning a logical true if and only if the elements pair are not equal or unordered.
constexpr auto eve::is_lez = functor<is_lez_t>
 elementwise callable returning a logical true if and only if the element value is less or equal to 0.
constexpr auto eve::is_ltz = functor<is_ltz_t>
 elementwise callable returning a logical true if and only if the element value is less than 0.
constexpr auto eve::is_minf = functor<is_minf_t>
 elementwise callable returning a logical true if and only if the element is a negative infinite value
constexpr auto eve::is_nan = functor<is_nan_t>
 elementwise callable returning a logical true if and only if the element value is NaN
constexpr auto eve::is_negative = functor<is_negative_t>
 elementwise callable returning a logical true if and only if the element value is signed and has its sign bit set
constexpr auto eve::is_nemz = functor<is_nemz_t>
 elementwise callable returning a logical true unless the element value is a floating zero with its sign bit set (mzero) or a NaN.
constexpr auto eve::is_nepz = functor<is_nepz_t>
 elementwise callable returning a logical true unless the element value is a floating zero with its sign bit unset.
constexpr auto eve::is_nez = functor<is_nez_t>
 elementwise callable returning a logical true if and only if the element value is not zero.
constexpr auto eve::is_ngez = functor<is_ngez_t>
 elementwise callable returning a logical true if and only if the element value is not greater or equal to 0.
constexpr auto eve::is_ngtz = functor<is_ngtz_t>
 elementwise callable returning a logical true if and only if the element value is not greater than zero.
constexpr auto eve::is_nlez = functor<is_nlez_t>
 elementwise callable returning a logical true if and only if the element value is not less or equal to 0.
constexpr auto eve::is_nltz = functor<is_nltz_t>
 elementwise callable returning a logical true if and only if the element value is not less than zero.
constexpr auto eve::is_normal = functor<is_normal_t>
 elementwise callable returning a logical true if and only if the element value is normal.
constexpr auto eve::is_not_denormal = functor<is_not_denormal_t>
 elementwise callable returning a logical true if and only if the element value is not denormal.
constexpr auto eve::is_not_equal = functor<is_not_equal_t>
 elementwise callable returning a logical true if and only if the element values are not equal.
constexpr auto eve::is_not_finite = functor<is_not_finite_t>
 elementwise callable returning a logical true if and only if the element is not a finite value
constexpr auto eve::is_not_flint = functor<is_not_flint_t>
 elementwise callable returning a logical true if and only if the element value is a floating value not representing an integer
constexpr auto eve::is_not_greater = functor<is_not_greater_t>
 elementwise callable returning a logical true if and only if the element value of the first parameter is not greater than the second one.
constexpr auto eve::is_not_greater_equal = functor<is_not_greater_equal_t>
 elementwise callable returning a logical true if and only if the element value of the first parameter is not greater or equal to the second one.
constexpr auto eve::is_not_infinite = functor<is_not_infinite_t>
 elementwise callable returning a logical true if and only if the element is not an infinite value
constexpr auto eve::is_not_less = functor<is_not_less_t>
 elementwise callable returning a logical true if and only if the element value of the first parameter is not less than the second one.
constexpr auto eve::is_not_less_equal = functor<is_not_less_equal_t>
 elementwise callable returning a logical true if and only if the element value of the first parameter is not less or equal to the second one.
constexpr auto eve::is_not_nan = functor<is_not_nan_t>
 elementwise callable returning a logical true if and only if the element value is not NaN
constexpr auto eve::is_odd = functor<is_odd_t>
 elementwise callable returning a logical true if and only if the element value is odd.
constexpr auto eve::is_ordered = functor<is_ordered_t>
 elementwise callable returning a logical true if and only no parameter is NaN.
constexpr auto eve::is_pinf = functor<is_pinf_t>
 elementwise callable returning a logical true if and only if the element is a positive infinite value
constexpr auto eve::is_positive = functor<is_positive_t>
 elementwise callable returning a logical true if and only if the element value is signed and has its sign bit not set
constexpr auto eve::is_pow2 = functor<is_pow2_t>
 elementwise callable returning a logical true if and only if the element value is a power of 2.
constexpr auto eve::is_unit = functor<is_unit_t>
 elementwise callable returning a logical true if and only if the element value is zero.
constexpr auto eve::is_unordered = functor<is_unordered_t>
 elementwise callable returning a logical true if and only if at least one of the parameters is NaN.

Variable Documentation

◆ compare_absolute

auto eve::compare_absolute = functor<compare_absolute_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the absolute value of the first parameters satisfy the predicate parameters.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto compare_absolute(value auto x, auto f) noexcept; // 1
constexpr auto compare_absolute(value auto x, value auto y, auto f) noexcept; // 1
// Lanes masking
constexpr auto compare_absolute[conditional_expr auto c](value auto x, value auto y, auto f) noexcept; // 2
constexpr auto compare_absolute[logical_value auto m](value auto x, value auto y, auto f) noexcept; // 2
constexpr auto compare_absolute[conditional_expr auto c](value auto x, auto f) noexcept; // 2
constexpr auto compare_absolute[logical_value auto m](value auto x, auto f) noexcept; // 2
// Semantic options
constexpr auto compare_absolute[saturated](value auto x, auto f) noexcept; // 3
constexpr auto compare_absolute[saturated](value auto x, value auto y, auto f) noexcept; // 3
}
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:134
The concept value<T> is satisfied if and only if T satisfies either eve::scalar_value or eve::simd_va...
Definition value.hpp:34
constexpr auto saturated
Keeps the result inside the range of its type instead of wrapping or overflowing.
Definition core.hpp:104
constexpr auto compare_absolute
elementwise callable returning a logical true if and only if the absolute value of the first paramete...
Definition compare_absolute.hpp:87
EVE Main Namespace.
Definition abi.hpp:19

Parameters

Return value

  1. The call eve::compare_absolute(x,y,f) is semantically equivalent to f(abs(x), abs(y)) and eve::compare_absolute(x,f) is semantically equivalent to f(abs(x)) and
  2. The operation is performed conditionally.
  3. the option is transferred to 'abs' in the call.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> compare_absolute(wf0, wf1, is_greater) = " << eve::compare_absolute(wf0, wf1, is_greater) << "\n";
std::cout << "-> compare_absolute[ignore_last(2)](wf0, wf1, is_greater) = " << eve::compare_absolute[eve::ignore_last(2)](wf0, wf1, is_greater) << "\n";
std::cout << "-> compare_absolute[wf0 != 0](wf0, wf1, is_greater) = " << eve::compare_absolute[wf0 != 0](wf0, wf1, is_greater) << "\n";
std::cout << "-> compare_absolute(wu0, wu1, is_greater) = " << eve::compare_absolute(wu0, wu1, is_greater) << "\n";
std::cout << "-> compare_absolute[ignore_last(2)](wu0, wu1, is_greater) = " << eve::compare_absolute[eve::ignore_last(2)](wu0, wu1, is_greater) << "\n";
std::cout << "-> compare_absolute[wu0 != 0](wu0, wu1, is_greater) = " << eve::compare_absolute[wu0 != 0](wu0, wu1, is_greater) << "\n";
std::cout << "-> compare_absolute(wi0, wi1, is_greater) = " << eve::compare_absolute(wi0, wi1, is_greater) << "\n";
std::cout << "-> compare_absolute[ignore_last(2)](wi0, wi1, is_greater) = " << eve::compare_absolute[eve::ignore_last(2)](wi0, wi1, is_greater) << "\n";
std::cout << "-> compare_absolute[wi0 != 0](wi0, wi1, is_greater) = " << eve::compare_absolute[wi0 != 0](wi0, wi1, is_greater) << "\n";
}
constexpr auto is_greater
elementwise callable returning a logical true if and only if the element value of the first parameter...
Definition is_greater.hpp:90
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition conditional.hpp:361
Wrapper for SIMD registers.
Definition wide.hpp:94

◆ is_bit_equal

auto eve::is_bit_equal = functor<is_bit_equal_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element bits are all equal.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_bit_equal(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_bit_equal[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_bit_equal[logical_value auto m](value auto x, value auto y) noexcept; // 2
}
constexpr auto is_bit_equal
elementwise callable returning a logical true if and only if the element bits are all equal.
Definition is_bit_equal.hpp:84

Parameters

Return value

  1. Returns the logical value containing the elementwise bit equality test result between x and y.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -0.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, 0.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, 3, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 4u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_bit_equal(wf0, wf1) = " << eve::is_bit_equal(wf0, wf1) << "\n";
std::cout << "-> is_bit_equal[ignore_last(2)](wf0, wf1) = " << eve::is_bit_equal[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_bit_equal[wf0 != 0](wf0, wf1) = " << eve::is_bit_equal[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_bit_equal[wu0 != 0](wu0, wu1) = " << eve::is_bit_equal[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_bit_equal(wi0, wi1) = " << eve::is_bit_equal(wi0, wi1) << "\n";
std::cout << "-> is_bit_equal[ignore_last(2)](wi0, wi1) = " << eve::is_bit_equal[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_bit_equal[wi0 != 0](wi0, wi1) = " << eve::is_bit_equal[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_denormal

auto eve::is_denormal = functor<is_denormal_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is denormal

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overloads
constexpr auto is_denormal(floating_value auto x) noexcept; // 1
constexpr auto is_denormal(integral_value auto x) noexcept; // 2
// Lanes masking
constexpr auto is_denormal[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 3
constexpr auto is_denormal[logical_value auto m](/*any of the above overloads*/) noexcept; // 3
}
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:116
The concept integral_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:51
constexpr auto is_denormal
elementwise callable returning a logical true if and only if the element value is denormal
Definition is_denormal.hpp:79

Parameters

Return value

  1. returns elementwise true if and only if the element value is denormal.
  2. always return false.
  3. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "-> is_denormal(wf0) = " << eve::is_denormal(wf0) << "\n";
std::cout << "-> is_denormal[ignore_last(2)](wf0) = " << eve::is_denormal[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_denormal[wf0 != 0](wf0) = " << eve::is_denormal[wf0 != 0](wf0) << "\n";
std::cout << "-> is_denormal(wi0) = " << eve::is_denormal(wi0) << "\n";
}

◆ is_eqmz

auto eve::is_eqmz = functor<is_eqmz_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is a floating zero with its sign bit set (mzero).

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_eqmz(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_eqmz[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_eqmz[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_eqmz
elementwise callable returning a logical true if and only if the element value is a floating zero wit...
Definition is_eqmz.hpp:73

Parameters

Return value

  1. returns elementwise true if and only if the element value is a floating zero with sign bit set (mzero).
  2. The operation is performed conditionally.
Note
This function is not defined for integral typed entries to avoid misuse.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -0.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "-> is_eqmz(wf0) = " << eve::is_eqmz(wf0) << "\n";
std::cout << "-> is_eqmz[ignore_last(2)](wf0) = " << eve::is_eqmz[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_eqmz[wf0 != 0](wf0) = " << eve::is_eqmz[wf0 != 0](wf0) << "\n";
}

◆ is_eqpz

auto eve::is_eqpz = functor<is_eqpz_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is a floating zero with its sign bit unset.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_eqpz(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_eqpz[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_eqpz[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_eqpz
elementwise callable returning a logical true if and only if the element value is a floating zero wit...
Definition is_eqpz.hpp:75

Parameters

Return value

  1. returns elementwise true if and only if the element value is zero with sign bit unset.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -0.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "-> is_eqpz(wf0) = " << eve::is_eqpz(wf0) << "\n";
std::cout << "-> is_eqpz[ignore_last(2)](wf0) = " << eve::is_eqpz[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_eqpz[wf0 != 0](wf0) = " << eve::is_eqpz[wf0 != 0](wf0) << "\n";
}

◆ is_equal

auto eve::is_equal = functor<is_equal_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element values are equal.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_equal(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_equal[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_equal[logical_value auto m](value auto x, value auto y) noexcept; // 2
// Semantic option
constexpr auto is_equal[numeric](/*any of the above overloads*/) noexcept; // 3
constexpr auto is_equal[almost](/*any of the above overloads*/) noexcept; // 4
constexpr auto is_equal[almost = tol](/*any of the above overloads*/) noexcept; // 4
}
constexpr auto numeric
Makes NaN lose against any definite value.
Definition core.hpp:89
constexpr auto almost
Turns an equality or an ordering into its tolerant form.
Definition core.hpp:313
constexpr auto is_equal
elementwise callable returning a logical true if and only if the element values are equal.
Definition is_equal.hpp:93

Parameters

Return value

  1. Returns the logical value containing the elementwise equality test result between x and y. The infix notation x == y can also be used.
  2. The operation is performed conditionally.
  3. The expression is_equal[numeric](x,y) considers that Nan values are equal.
  4. The expression is_equal[almost = tol](x, y) where x and y must be floating point values, evaluates to true if and only if x is almost equal to y. This means that:
    • if tol is a floating value then \(|x - y| \le \mbox{tol}\cdot \max(|x|, |y|)\)
    • if tol is a positive integral value then there are not more than tol values of the type of x representable in the interval \([x, y[\).
    • if tol is omitted then the tolerance tol default to 3*eps(as(x)).
Note
Although the infix notation with == is supported, the == operator on standard scalar types is the original one and so returns bool result, not eve::logical.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_equal(wf0, wf1) = " << eve::is_equal(wf0, wf1) << "\n";
std::cout << "-> is_equal[ignore_last(2)](wf0, wf1) = " << eve::is_equal[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_equal[wf0 != 0](wf0, wf1) = " << eve::is_equal[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_equal[numeric](wf0, wf1) = " << eve::is_equal[eve::numeric](wf0, wf1) << "\n";
std::cout << "-> is_equal[almost](wf0, wf1) = " << eve::is_equal[eve::almost](wf0, wf1) << "\n";
std::cout << "-> is_equal(wu0, wu1) = " << eve::is_equal(wu0, wu1) << "\n";
std::cout << "-> is_equal[ignore_last(2)](wu0, wu1) = " << eve::is_equal[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_equal[wu0 != 0](wu0, wu1) = " << eve::is_equal[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_equal(wi0, wi1) = " << eve::is_equal(wi0, wi1) << "\n";
std::cout << "-> is_equal[ignore_last(2)](wi0, wi1) = " << eve::is_equal[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_equal[wi0 != 0](wi0, wi1) = " << eve::is_equal[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_eqz

auto eve::is_eqz = functor<is_eqz_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is zero. This includes both positive and negative zero for floating point values.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_eqz(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_eqz[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_eqz[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_eqz
elementwise callable returning a logical true if and only if the element value is zero....
Definition is_eqz.hpp:74

Parameters

Return value

  1. returns elementwise true if and only if the element value is zero.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -0.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_eqz(wf0) = " << eve::is_eqz(wf0) << "\n";
std::cout << "-> is_eqz[ignore_last(2)](wf0) = " << eve::is_eqz[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_eqz[wf0 != 0](wf0) = " << eve::is_eqz[wf0 != 0](wf0) << "\n";
std::cout << "-> is_eqz(wu0) = " << eve::is_eqz(wu0) << "\n";
std::cout << "-> is_eqz[ignore_last(2)](wu0) = " << eve::is_eqz[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_eqz[wu0 != 0](wu0) = " << eve::is_eqz[wu0 != 0](wu0) << "\n";
std::cout << "-> is_eqz(wi0) = " << eve::is_eqz(wi0) << "\n";
std::cout << "-> is_eqz[ignore_last(2)](wi0) = " << eve::is_eqz[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_eqz[wi0 != 0](wi0) = " << eve::is_eqz[wi0 != 0](wi0) << "\n";
}

◆ is_even

auto eve::is_even = functor<is_even_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is even.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_even(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_even[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_even[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_even
elementwise callable returning a logical true if and only if the element value is even.
Definition is_even.hpp:78

Parameters

Return value

  1. returns elementwise true if and only if the element value is even.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_even(wf0) = " << eve::is_even(wf0) << "\n";
std::cout << "-> is_even[ignore_last(2)](wf0) = " << eve::is_even[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_even[wf0 != 0](wf0) = " << eve::is_even[wf0 != 0](wf0) << "\n";
std::cout << "-> is_even(wu0) = " << eve::is_even(wu0) << "\n";
std::cout << "-> is_even[ignore_last(2)](wu0) = " << eve::is_even[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_even[wu0 != 0](wu0) = " << eve::is_even[wu0 != 0](wu0) << "\n";
std::cout << "-> is_even(wi0) = " << eve::is_even(wi0) << "\n";
std::cout << "-> is_even[ignore_last(2)](wi0) = " << eve::is_even[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_even[wi0 != 0](wi0) = " << eve::is_even[wi0 != 0](wi0) << "\n";
}

◆ is_finite

auto eve::is_finite = functor<is_finite_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element is a finite value

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overloads
constexpr auto is_finite(floating_value auto x) noexcept; // 1
constexpr auto is_finite(integral_value auto x) noexcept; // 2
// Lanes masking
constexpr auto is_finite[conditional_expr auto c](value auto x) noexcept; // 3
constexpr auto is_finite[logical_value auto m](value auto x) noexcept; // 3
}
constexpr auto is_finite
elementwise callable returning a logical true if and only if the element is a finite value
Definition is_finite.hpp:73

Parameters

Return value

  1. is_finite(x) is semantically equivalent to is_not_nan(x-x),
  2. Always returns true.
  3. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_finite(wf0) = " << eve::is_finite(wf0) << "\n";
std::cout << "-> is_finite[ignore_last(2)](wf0) = " << eve::is_finite[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_finite[wf0 != 0](wf0) = " << eve::is_finite[wf0 != 0](wf0) << "\n";
std::cout << "-> is_finite[ignore_last(2)](wu0) = " << eve::is_finite[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_finite[wu0 != 0](wu0) = " << eve::is_finite[wu0 != 0](wu0) << "\n";
std::cout << "-> is_finite(wi0) = " << eve::is_finite(wi0) << "\n";
std::cout << "-> is_finite[ignore_last(2)](wi0) = " << eve::is_finite[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_finite[wi0 != 0](wi0) = " << eve::is_finite[wi0 != 0](wi0) << "\n";
}

◆ is_flint

auto eve::is_flint = functor<is_flint_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is a floating value representing an integer

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overloads
constexpr auto is_flint(floating_value auto x) noexcept; // 1
constexpr auto is_flint(integer_value auto x) noexcept; // 2
// Lanes masking
constexpr auto is_flint[conditional_expr auto c](value auto x) noexcept; // 3
constexpr auto is_flint[logical_value auto m](value auto x) noexcept; // 3
// Semantic options
constexpr auto is_flint[pedantic](floating_value auto x) noexcept; // 4
}
constexpr auto pedantic
Follows the corner cases of the corresponding standard function.
Definition core.hpp:91
constexpr auto is_flint
elementwise callable returning a logical true if and only if the element value is a floating value re...
Definition is_flint.hpp:81

Parameters

Return value

  1. The call is_flint(x) is semantically equivalent to is_eqz (eve::frac(x)); This means that x represents an integral value.
  2. Always returns true
  3. The operation is performed conditionally.
  4. The call is_flint[pedantic](x) also check that the input is not greater or equal to the largest consecutive integer in the element type of x (maxflint(as(x))).

Example

// revision 1
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_flint(wf0) = " << eve::is_flint(wf0) << "\n";
std::cout << "-> is_flint[ignore_last(2)](wf0) = " << eve::is_flint[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_flint[wf0 != 0](wf0) = " << eve::is_flint[wf0 != 0](wf0) << "\n";
std::cout << "-> is_flint[pedantic](wf0) = " << eve::is_flint[eve::pedantic](wf0) << "\n";
std::cout << "-> is_flint[ignore_last(2)](wu0) = " << eve::is_flint[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_flint[wu0 != 0](wu0) = " << eve::is_flint[wu0 != 0](wu0) << "\n";
std::cout << "-> is_flint(wi0) = " << eve::is_flint(wi0) << "\n";
std::cout << "-> is_flint[ignore_last(2)](wi0) = " << eve::is_flint[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_flint[wi0 != 0](wi0) = " << eve::is_flint[wi0 != 0](wi0) << "\n";
}

◆ is_gez

auto eve::is_gez = functor<is_gez_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is greater or equal to 0.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_gez(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_gez[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_gez[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_gez
elementwise callable returning a logical true if and only if the element value is greater or equal to...
Definition is_gez.hpp:71

Parameters

Return value

  1. Returns elementwise x >= 0.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, eve::minf(eve::as<double>())};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_gez(wf0) = " << eve::is_gez(wf0) << "\n";
std::cout << "-> is_gez[ignore_last(2)](wf0) = " << eve::is_gez[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_gez[wf0 != 0](wf0) = " << eve::is_gez[wf0 != 0](wf0) << "\n";
std::cout << "-> is_gez(wu0) = " << eve::is_gez(wu0) << "\n";
std::cout << "-> is_gez[ignore_last(2)](wu0) = " << eve::is_gez[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_gez[wu0 != 0](wu0) = " << eve::is_gez[wu0 != 0](wu0) << "\n";
std::cout << "-> is_gez(wi0) = " << eve::is_gez(wi0) << "\n";
std::cout << "-> is_gez[ignore_last(2)](wi0) = " << eve::is_gez[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_gez[wi0 != 0](wi0) = " << eve::is_gez[wi0 != 0](wi0) << "\n";
}
constexpr auto minf
Computes the -infinity ieee value.
Definition minf.hpp:67
Lightweight type-wrapper.
Definition as.hpp:29

◆ is_greater

auto eve::is_greater = functor<is_greater_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value of the first parameter is greater than the second one.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_greater(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_greater[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_greater[logical_value auto m](value auto x, value auto y) noexcept; // 2
// Semantic option
constexpr auto is_greater[definitely](/*any of the above overloads*/) noexcept; // 3
constexpr auto is_greater[definitely = tol](/*any of the above overloads*/) noexcept; // 3
}
constexpr auto definitely
Requires a strict comparison to hold by a margin.
Definition core.hpp:333

Parameters

Return value

  1. The call eve::is_greater(x,y) is semantically equivalent to x > y:
  2. The operation is performed conditionally.
  3. The expression is_greater[definitely = tol](x, y) where x and y must be floating point values, evaluates to true if and only if x is definitely greater than y. This means that:
    • if tol is a floating value then \(x > y + \mbox{tol}\cdot \max(|x|, |y|)\)
    • if tol is a positive integral value then \(x > \mbox{next}(y, \mbox{tol})\);
    • if tol is omitted then the tolerance tol default to 3*eps(as(x)).

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_greater(wf0, wf1) = " << eve::is_greater(wf0, wf1) << "\n";
std::cout << "-> is_greater[ignore_last(2)](wf0, wf1) = " << eve::is_greater[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_greater[wf0 != 0](wf0, wf1) = " << eve::is_greater[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_greater[definitely](wf0, wf1) = " << eve::is_greater[eve::definitely](wf0, wf1) << "\n";
std::cout << "-> is_greater(wu0, wu1) = " << eve::is_greater(wu0, wu1) << "\n";
std::cout << "-> is_greater[ignore_last(2)](wu0, wu1) = " << eve::is_greater[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_greater[wu0 != 0](wu0, wu1) = " << eve::is_greater[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_greater(wi0, wi1) = " << eve::is_greater(wi0, wi1) << "\n";
std::cout << "-> is_greater[ignore_last(2)](wi0, wi1) = " << eve::is_greater[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_greater[wi0 != 0](wi0, wi1) = " << eve::is_greater[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_greater_equal

auto eve::is_greater_equal = functor<is_greater_equal_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value of the first parameter is greater or equal to the second one.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_greater_equal(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_greater_equal[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_greater_equal[logical_value auto m](value auto x, value auto y) noexcept; // 2
// Semantic option
constexpr auto is_greater_equal[almost](/*any of the above overloads*/) noexcept; // 3
constexpr auto is_greater_equal[almost = tol](/*any of the above overloads*/) noexcept; // 3
}
constexpr auto is_greater_equal
elementwise callable returning a logical true if and only if the element value of the first parameter...
Definition is_greater_equal.hpp:90

Parameters

Return value

  1. The call eve::is_greater_equal(x,y) is semantically equivalent to x >= y:
  2. The operation is performed conditionally.
  3. The expression is_greater_equal[almost = tol](x, y) where x and y must be floating point values, evaluates to true if and only if x is almost greater than y. This means that:
    • if tol is a floating value then \(x \ge y - \mbox{tol}\cdot \max(|x|, |y|)\)
    • if tol is a positive integral value then \(x \ge \mbox{prev}(y, \mbox{tol})\);
    • if tol is omitted then the tolerance tol default to 3*eps(as(x)).

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_greater_equal(wf0, wf1) = " << eve::is_greater_equal(wf0, wf1) << "\n";
std::cout << "-> is_greater_equal[ignore_last(2)](wf0, wf1) = " << eve::is_greater_equal[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_greater_equal[wf0 != 0](wf0, wf1) = " << eve::is_greater_equal[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_greater_equal[almost](wf0, wf1) = " << eve::is_greater_equal[eve::almost](wf0, wf1) << "\n";
std::cout << "-> is_greater_equal(wu0, wu1) = " << eve::is_greater_equal(wu0, wu1) << "\n";
std::cout << "-> is_greater_equal[ignore_last(2)](wu0, wu1) = " << eve::is_greater_equal[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_greater_equal[wu0 != 0](wu0, wu1) = " << eve::is_greater_equal[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_greater_equal(wi0, wi1) = " << eve::is_greater_equal(wi0, wi1) << "\n";
std::cout << "-> is_greater_equal[ignore_last(2)](wi0, wi1) = " << eve::is_greater_equal[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_greater_equal[wi0 != 0](wi0, wi1) = " << eve::is_greater_equal[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_gtz

auto eve::is_gtz = functor<is_gtz_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is greater than 0.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_gtz(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_gtz[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_gtz[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_gtz
elementwise callable returning a logical true if and only if the element value is greater than 0.
Definition is_gtz.hpp:73

Parameters

Return value

  1. Returns elementwise x > 0.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_gtz(wf0) = " << eve::is_gtz(wf0) << "\n";
std::cout << "-> is_gtz[ignore_last(2)](wf0) = " << eve::is_gtz[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_gtz[wf0 != 0](wf0) = " << eve::is_gtz[wf0 != 0](wf0) << "\n";
std::cout << "-> is_gtz(wu0) = " << eve::is_gtz(wu0) << "\n";
std::cout << "-> is_gtz[ignore_last(2)](wu0) = " << eve::is_gtz[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_gtz[wu0 != 0](wu0) = " << eve::is_gtz[wu0 != 0](wu0) << "\n";
std::cout << "-> is_gtz(wi0) = " << eve::is_gtz(wi0) << "\n";
std::cout << "-> is_gtz[ignore_last(2)](wi0) = " << eve::is_gtz[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_gtz[wi0 != 0](wi0) = " << eve::is_gtz[wi0 != 0](wi0) << "\n";
}

◆ is_infinite

auto eve::is_infinite = functor<is_infinite_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element is an infinite value

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_infinite(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_infinite[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_infinite[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_infinite
elementwise callable returning a logical true if and only if the element is an infinite value
Definition is_infinite.hpp:73

Parameters

Return value

  1. For floating entries returns true if x is equals to eve::inf(as(x)) or eve::minf(as(x)), and is always false for integral types.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_infinite(wf0) = " << eve::is_infinite(wf0) << "\n";
std::cout << "-> is_infinite[ignore_last(2)](wf0) = " << eve::is_infinite[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_infinite[wf0 != 0](wf0) = " << eve::is_infinite[wf0 != 0](wf0) << "\n";
std::cout << "-> is_infinite(wu0) = " << eve::is_infinite(wu0) << "\n";
std::cout << "-> is_infinite[ignore_last(2)](wu0) = " << eve::is_infinite[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_infinite[wu0 != 0](wu0) = " << eve::is_infinite[wu0 != 0](wu0) << "\n";
std::cout << "-> is_infinite(wi0) = " << eve::is_infinite(wi0) << "\n";
std::cout << "-> is_infinite[ignore_last(2)](wi0) = " << eve::is_infinite[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_infinite[wi0 != 0](wi0) = " << eve::is_infinite[wi0 != 0](wi0) << "\n";
}

◆ is_less

auto eve::is_less = functor<is_less_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value of the first parameter is less than the second one.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_less(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_less[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_less[logical_value auto m](value auto x, value auto y) noexcept; // 2
// Semantic option
constexpr auto is_less[definitely](/*any of the above overloads*/) noexcept; // 3
constexpr auto is_less[definitely = tol](/*any of the above overloads*/) noexcept; // 3
}
constexpr auto is_less
elementwise callable returning a logical true if and only if the element value of the first parameter...
Definition is_less.hpp:92

Parameters

Return value

  1. The call eve::is_less(x,y) is semantically equivalent to x < y:
  2. The operation is performed conditionally.
  3. The expression is_greater[definitely = tol](x, y) where x and y must be floating point values, evaluates to true if and only if x is definitely greater than y. This means that:
    • if tol is a floating value then \(x < y - \mbox{tol}\cdot \max(|x|, |y|)\)
    • if tol is a positive integral value then \(x < \mbox{prev}(y, \mbox{tol})\);
    • if tol is omitted then the tolerance tol default to 3*eps(as(x)).

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_less(wf0, wf1) = " << eve::is_less(wf0, wf1) << "\n";
std::cout << "-> is_less[ignore_last(2)](wf0, wf1) = " << eve::is_less[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_less[wf0 != 0](wf0, wf1) = " << eve::is_less[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_less[definitely](wf0, wf1) = " << eve::is_less[eve::definitely](wf0, wf1) << "\n";
std::cout << "-> is_less(wu0, wu1) = " << eve::is_less(wu0, wu1) << "\n";
std::cout << "-> is_less[ignore_last(2)](wu0, wu1) = " << eve::is_less[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_less[wu0 != 0](wu0, wu1) = " << eve::is_less[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_less(wi0, wi1) = " << eve::is_less(wi0, wi1) << "\n";
std::cout << "-> is_less[ignore_last(2)](wi0, wi1) = " << eve::is_less[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_less[wi0 != 0](wi0, wi1) = " << eve::is_less[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_less_equal

auto eve::is_less_equal = functor<is_less_equal_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value of the first parameter is less or equal to the second one.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_less_equal(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_less_equal[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_less_equal[logical_value auto m](value auto x, value auto y) noexcept; // 2
// Semantic option
constexpr auto is_less_equal[almost](/*any of the above overloads*/) noexcept; // 3
constexpr auto is_less_equal[almost = tol](/*any of the above overloads*/) noexcept; // 3
}
constexpr auto is_less_equal
elementwise callable returning a logical true if and only if the element value of the first parameter...
Definition is_less_equal.hpp:90

Parameters

Return value

  1. The call eve::is_less_equal(x,y) is semantically equivalent to x <= y:
  2. The operation is performed conditionally.
  3. The expression is_less_equal[almost = tol](x, y) where x and y must be floating point values, evaluates to true if and only if x is almost less than y. This means that:
    • if tol is a floating value then \(x \le y + \mbox{tol}\cdot \max(|x|, |y|)\)
    • if tol is a positive integral value then \(x \le \mbox{next}(y, \mbox{tol})\);
    • if tol is omitted then the tolerance tol default to 3*eps(as(x)).

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_less_equal(wf0, wf1) = " << eve::is_less_equal(wf0, wf1) << "\n";
std::cout << "-> is_less_equal[ignore_last(2)](wf0, wf1) = " << eve::is_less_equal[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_less_equal[wf0 != 0](wf0, wf1) = " << eve::is_less_equal[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_less_equal[almost](wf0, wf1) = " << eve::is_less_equal[eve::almost](wf0, wf1) << "\n";
std::cout << "-> is_less_equal(wu0, wu1) = " << eve::is_less_equal(wu0, wu1) << "\n";
std::cout << "-> is_less_equal[ignore_last(2)](wu0, wu1) = " << eve::is_less_equal[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_less_equal[wu0 != 0](wu0, wu1) = " << eve::is_less_equal[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_less_equal(wi0, wi1) = " << eve::is_less_equal(wi0, wi1) << "\n";
std::cout << "-> is_less_equal[ignore_last(2)](wi0, wi1) = " << eve::is_less_equal[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_less_equal[wi0 != 0](wi0, wi1) = " << eve::is_less_equal[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_lessgreater

auto eve::is_lessgreater = functor<is_lessgreater_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the elements pair are not equal or unordered.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_lessgreater(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_lessgreater[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_lessgreater[logical_value auto m](value auto x, value auto y) noexcept; // 2
}
constexpr auto is_lessgreater
elementwise callable returning a logical true if and only if the elements pair are not equal or unord...
Definition is_lessgreater.hpp:72

Parameters

Return value

  1. The call eve::is_lessgreater(x, y) is semantically equivalent to x < y || x > y:
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_lessgreater(wf0, wf1) = " << eve::is_lessgreater(wf0, wf1) << "\n";
std::cout << "-> is_lessgreater[ignore_last(2)](wf0, wf1) = " << eve::is_lessgreater[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_lessgreater[wf0 != 0](wf0, wf1) = " << eve::is_lessgreater[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_lessgreater(wu0, wu1) = " << eve::is_lessgreater(wu0, wu1) << "\n";
std::cout << "-> is_lessgreater[ignore_last(2)](wu0, wu1) = " << eve::is_lessgreater[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_lessgreater[wu0 != 0](wu0, wu1) = " << eve::is_lessgreater[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_lessgreater(wi0, wi1) = " << eve::is_lessgreater(wi0, wi1) << "\n";
std::cout << "-> is_lessgreater[ignore_last(2)](wi0, wi1) = " << eve::is_lessgreater[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_lessgreater[wi0 != 0](wi0, wi1) = " << eve::is_lessgreater[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_lez

auto eve::is_lez = functor<is_lez_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is less or equal to 0.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_lez(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_lez[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_lez[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_lez
elementwise callable returning a logical true if and only if the element value is less or equal to 0.
Definition is_lez.hpp:70

Parameters

Return value

  1. Returns elementwise x <= 0.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_lez(wf0) = " << eve::is_lez(wf0) << "\n";
std::cout << "-> is_lez[ignore_last(2)](wf0) = " << eve::is_lez[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_lez[wf0 != 0](wf0) = " << eve::is_lez[wf0 != 0](wf0) << "\n";
std::cout << "-> is_lez(wu0) = " << eve::is_lez(wu0) << "\n";
std::cout << "-> is_lez[ignore_last(2)](wu0) = " << eve::is_lez[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_lez[wu0 != 0](wu0) = " << eve::is_lez[wu0 != 0](wu0) << "\n";
std::cout << "-> is_lez(wi0) = " << eve::is_lez(wi0) << "\n";
std::cout << "-> is_lez[ignore_last(2)](wi0) = " << eve::is_lez[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_lez[wi0 != 0](wi0) = " << eve::is_lez[wi0 != 0](wi0) << "\n";
}

◆ is_ltz

auto eve::is_ltz = functor<is_ltz_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is less than 0.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_ltz(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_ltz[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_ltz[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_ltz
elementwise callable returning a logical true if and only if the element value is less than 0.
Definition is_ltz.hpp:71

Parameters

Return value

  1. Returns elementwise x < 0.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_ltz(wf0) = " << eve::is_ltz(wf0) << "\n";
std::cout << "-> is_ltz[ignore_last(2)](wf0) = " << eve::is_ltz[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_ltz[wf0 != 0](wf0) = " << eve::is_ltz[wf0 != 0](wf0) << "\n";
std::cout << "-> is_ltz(wu0) = " << eve::is_ltz(wu0) << "\n";
std::cout << "-> is_ltz[ignore_last(2)](wu0) = " << eve::is_ltz[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_ltz[wu0 != 0](wu0) = " << eve::is_ltz[wu0 != 0](wu0) << "\n";
std::cout << "-> is_ltz(wi0) = " << eve::is_ltz(wi0) << "\n";
std::cout << "-> is_ltz[ignore_last(2)](wi0) = " << eve::is_ltz[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_ltz[wi0 != 0](wi0) = " << eve::is_ltz[wi0 != 0](wi0) << "\n";
}

◆ is_minf

auto eve::is_minf = functor<is_minf_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element is a negative infinite value

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_minf(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_minf[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_minf[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_minf
elementwise callable returning a logical true if and only if the element is a negative infinite value
Definition is_minf.hpp:73

Parameters

Return value

  1. For floating entries returns true if x is equals to eve::minf(as(x)), and is always false for integral types.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, eve::minf(eve::as<double>()), -1.0, -2.0, eve::inf(eve::as<double>()), -0.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_minf(wf0) = " << eve::is_minf(wf0) << "\n";
std::cout << "-> is_minf[ignore_last(2)](wf0) = " << eve::is_minf[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_minf[wf0 != 0](wf0) = " << eve::is_minf[wf0 != 0](wf0) << "\n";
std::cout << "-> is_minf(wu0) = " << eve::is_minf(wu0) << "\n";
std::cout << "-> is_minf[ignore_last(2)](wu0) = " << eve::is_minf[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_minf[wu0 != 0](wu0) = " << eve::is_minf[wu0 != 0](wu0) << "\n";
std::cout << "-> is_minf(wi0) = " << eve::is_minf(wi0) << "\n";
std::cout << "-> is_minf[ignore_last(2)](wi0) = " << eve::is_minf[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_minf[wi0 != 0](wi0) = " << eve::is_minf[wi0 != 0](wi0) << "\n";
}
constexpr auto inf
Computes the infinity ieee value.
Definition inf.hpp:67

◆ is_nan

auto eve::is_nan = functor<is_nan_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is NaN

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_nan(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_nan[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_nan[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_nan
elementwise callable returning a logical true if and only if the element value is NaN
Definition is_nan.hpp:70

Parameters

Return value

  1. For eal entries the call eve::is_nan(x) is semantically equivalent to x != x
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_nan(wf0) = " << eve::is_nan(wf0) << "\n";
std::cout << "-> is_nan[ignore_last(2)](wf0) = " << eve::is_nan[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_nan[wf0 != 0](wf0) = " << eve::is_nan[wf0 != 0](wf0) << "\n";
std::cout << "-> is_nan(wu0) = " << eve::is_nan(wu0) << "\n";
std::cout << "-> is_nan[ignore_last(2)](wu0) = " << eve::is_nan[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_nan[wu0 != 0](wu0) = " << eve::is_nan[wu0 != 0](wu0) << "\n";
std::cout << "-> is_nan(wi0) = " << eve::is_nan(wi0) << "\n";
std::cout << "-> is_nan[ignore_last(2)](wi0) = " << eve::is_nan[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_nan[wi0 != 0](wi0) = " << eve::is_nan[wi0 != 0](wi0) << "\n";
}

◆ is_negative

auto eve::is_negative = functor<is_negative_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is signed and has its sign bit set

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_negative(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_negative[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_negative[logical_value auto m](value auto x) noexcept; // 2
// Semantic options
constexpr auto is_negative[pedantic](value auto x)noexcept; // 3
}
constexpr auto is_negative
elementwise callable returning a logical true if and only if the element value is signed and has its ...
Definition is_negative.hpp:84

Parameters

Return value

  1. For signed types The call is_negative(x) returns true if and only if the bit of sign (most significant bit) is set. Of course the result on a NaN input is generally out of control.
  2. The operation is performed conditionally.
  3. with this option a NaN input always return false.
Note
this function coincides with is_ltz on integral real values, but for floating values T, is_negative(mzero<T>) is true and if n is a Nan the result depends of the bit of sign of n which can be out of control although not undefined.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -nan, nan};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_negative(wf0) = " << eve::is_negative(wf0) << "\n";
std::cout << "-> is_negative[pedantic](wf0) = " << eve::is_negative[eve::pedantic](wf0) << "\n";
std::cout << "-> is_negative[ignore_last(2)](wf0) = " << eve::is_negative[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_negative[wf0 != 0](wf0) = " << eve::is_negative[wf0 != 0](wf0) << "\n";
std::cout << "-> is_negative(wu0) = " << eve::is_negative(wu0) << "\n";
std::cout << "-> is_negative[ignore_last(2)](wu0) = " << eve::is_negative[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_negative[wu0 != 0](wu0) = " << eve::is_negative[wu0 != 0](wu0) << "\n";
std::cout << "-> is_negative(wi0) = " << eve::is_negative(wi0) << "\n";
std::cout << "-> is_negative[ignore_last(2)](wi0) = " << eve::is_negative[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_negative[wi0 != 0](wi0) = " << eve::is_negative[wi0 != 0](wi0) << "\n";
}
constexpr auto nan
Computes the IEEE quiet NaN constant.
Definition nan.hpp:67

◆ is_nemz

auto eve::is_nemz = functor<is_nemz_t>
inlineconstexpr

elementwise callable returning a logical true unless the element value is a floating zero with its sign bit set (mzero) or a NaN.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_nemz(floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_nemz[conditional_expr auto c](floating_value auto x) noexcept; // 2
constexpr auto is_nemz[logical_value auto m](floating_value auto x) noexcept; // 2
}
constexpr auto is_nemz
elementwise callable returning a logical true unless the element value is a floating zero with its si...
Definition is_nemz.hpp:72

Parameters

Return value

  1. is_nemz(x) is semantically equivalent to is_nan(x) || !is_eqmz(x).
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -0.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "-> is_nemz(wf0) = " << eve::is_nemz(wf0) << "\n";
std::cout << "-> is_nemz[ignore_last(2)](wf0) = " << eve::is_nemz[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_nemz[wf0 != 0](wf0) = " << eve::is_nemz[wf0 != 0](wf0) << "\n";
}

◆ is_nepz

auto eve::is_nepz = functor<is_nepz_t>
inlineconstexpr

elementwise callable returning a logical true unless the element value is a floating zero with its sign bit unset.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_nepz(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_nepz[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_nepz[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_nepz
elementwise callable returning a logical true unless the element value is a floating zero with its si...
Definition is_nepz.hpp:72

Parameters

Return value

  1. is_nepz(x) is semantically equivalent to !is_eqpz(x).
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -0.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "-> is_nepz(wf0) = " << eve::is_nepz(wf0) << "\n";
std::cout << "-> is_nepz[ignore_last(2)](wf0) = " << eve::is_nepz[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_nepz[wf0 != 0](wf0) = " << eve::is_nepz[wf0 != 0](wf0) << "\n";
}

◆ is_nez

auto eve::is_nez = functor<is_nez_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is not zero.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_nez(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_nez[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_nez[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_nez
elementwise callable returning a logical true if and only if the element value is not zero.
Definition is_nez.hpp:71

Parameters

Return value

  1. is_nez(x) is semantically equivalent x != 0.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_nez(wf0) = " << eve::is_nez(wf0) << "\n";
std::cout << "-> is_nez[ignore_last(2)](wf0) = " << eve::is_nez[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_nez[wf0 != 0](wf0) = " << eve::is_nez[wf0 != 0](wf0) << "\n";
std::cout << "-> is_nez(wu0) = " << eve::is_nez(wu0) << "\n";
std::cout << "-> is_nez[ignore_last(2)](wu0) = " << eve::is_nez[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_nez[wu0 != 0](wu0) = " << eve::is_nez[wu0 != 0](wu0) << "\n";
std::cout << "-> is_nez(wi0) = " << eve::is_nez(wi0) << "\n";
std::cout << "-> is_nez[ignore_last(2)](wi0) = " << eve::is_nez[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_nez[wi0 != 0](wi0) = " << eve::is_nez[wi0 != 0](wi0) << "\n";
}

◆ is_ngez

auto eve::is_ngez = functor<is_ngez_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is not greater or equal to 0.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_ngez(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_ngez[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_ngez[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_ngez
elementwise callable returning a logical true if and only if the element value is not greater or equa...
Definition is_ngez.hpp:73

Parameters

Return value

  1. is_gx) is semantically equivalent to !(x >= 0).
  2. The operation is performed conditionally.
Note
This is not equivalent to (x < 0) for floating values because of NaN properties.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_ngez(wf0) = " << eve::is_ngez(wf0) << "\n";
std::cout << "-> is_ngez[ignore_last(2)](wf0) = " << eve::is_ngez[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_ngez[wf0 != 0](wf0) = " << eve::is_ngez[wf0 != 0](wf0) << "\n";
std::cout << "-> is_ngez(wu0) = " << eve::is_ngez(wu0) << "\n";
std::cout << "-> is_ngez[ignore_last(2)](wu0) = " << eve::is_ngez[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_ngez[wu0 != 0](wu0) = " << eve::is_ngez[wu0 != 0](wu0) << "\n";
std::cout << "-> is_ngez(wi0) = " << eve::is_ngez(wi0) << "\n";
std::cout << "-> is_ngez[ignore_last(2)](wi0) = " << eve::is_ngez[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_ngez[wi0 != 0](wi0) = " << eve::is_ngez[wi0 != 0](wi0) << "\n";
}

◆ is_ngtz

auto eve::is_ngtz = functor<is_ngtz_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is not greater than zero.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_ngtz(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_ngtz[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_ngtz[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_ngtz
elementwise callable returning a logical true if and only if the element value is not greater than ze...
Definition is_ngtz.hpp:73

Parameters

Return value

  1. is_ngtz(x) is semantically equivalent to !(x > 0).
  2. The operation is performed conditionally.
Note
This is not equivalent to (x <= 0) for floating values because of NaN properties.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_ngtz(wf0) = " << eve::is_ngtz(wf0) << "\n";
std::cout << "-> is_ngtz[ignore_last(2)](wf0) = " << eve::is_ngtz[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_ngtz[wf0 != 0](wf0) = " << eve::is_ngtz[wf0 != 0](wf0) << "\n";
std::cout << "-> is_ngtz(wu0) = " << eve::is_ngtz(wu0) << "\n";
std::cout << "-> is_ngtz[ignore_last(2)](wu0) = " << eve::is_ngtz[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_ngtz[wu0 != 0](wu0) = " << eve::is_ngtz[wu0 != 0](wu0) << "\n";
std::cout << "-> is_ngtz(wi0) = " << eve::is_ngtz(wi0) << "\n";
std::cout << "-> is_ngtz[ignore_last(2)](wi0) = " << eve::is_ngtz[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_ngtz[wi0 != 0](wi0) = " << eve::is_ngtz[wi0 != 0](wi0) << "\n";
}

◆ is_nlez

auto eve::is_nlez = functor<is_nlez_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is not less or equal to 0.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_nlez(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_nlez[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_nlez[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_nlez
elementwise callable returning a logical true if and only if the element value is not less or equal t...
Definition is_nlez.hpp:72

Parameters

Return value

  1. is_nlez(x) is semantically equivalent to !(x < 0).
  2. The operation is performed conditionally.
Note
This is not equivalent to (x >= 0) for floating values because of NaN properties.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_nlez(wf0) = " << eve::is_nlez(wf0) << "\n";
std::cout << "-> is_nlez[ignore_last(2)](wf0) = " << eve::is_nlez[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_nlez[wf0 != 0](wf0) = " << eve::is_nlez[wf0 != 0](wf0) << "\n";
std::cout << "-> is_nlez(wu0) = " << eve::is_nlez(wu0) << "\n";
std::cout << "-> is_nlez[ignore_last(2)](wu0) = " << eve::is_nlez[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_nlez[wu0 != 0](wu0) = " << eve::is_nlez[wu0 != 0](wu0) << "\n";
std::cout << "-> is_nlez(wi0) = " << eve::is_nlez(wi0) << "\n";
std::cout << "-> is_nlez[ignore_last(2)](wi0) = " << eve::is_nlez[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_nlez[wi0 != 0](wi0) = " << eve::is_nlez[wi0 != 0](wi0) << "\n";
}

◆ is_nltz

auto eve::is_nltz = functor<is_nltz_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is not less than zero.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_nltz(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_nltz[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_nltz[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_nltz
elementwise callable returning a logical true if and only if the element value is not less than zero.
Definition is_nltz.hpp:73

Parameters

Return value

  1. is_nltz(x) is semantically equivalent to !(x < 0).
  2. The operation is performed conditionally.
Note
This is not equivalent to (x >= 0) for floating values because of NaN properties..

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_nltz(wf0) = " << eve::is_nltz(wf0) << "\n";
std::cout << "-> is_nltz[ignore_last(2)](wf0) = " << eve::is_nltz[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_nltz[wf0 != 0](wf0) = " << eve::is_nltz[wf0 != 0](wf0) << "\n";
std::cout << "-> is_nltz(wu0) = " << eve::is_nltz(wu0) << "\n";
std::cout << "-> is_nltz[ignore_last(2)](wu0) = " << eve::is_nltz[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_nltz[wu0 != 0](wu0) = " << eve::is_nltz[wu0 != 0](wu0) << "\n";
std::cout << "-> is_nltz(wi0) = " << eve::is_nltz(wi0) << "\n";
std::cout << "-> is_nltz[ignore_last(2)](wi0) = " << eve::is_nltz[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_nltz[wi0 != 0](wi0) = " << eve::is_nltz[wi0 != 0](wi0) << "\n";
}

◆ is_normal

auto eve::is_normal = functor<is_normal_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is normal.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overloads
constexpr auto is_normal(floating_value auto x) noexcept; // 1
constexpr auto is_normal(integral_value auto x) noexcept; // 2
// Lanes masking
constexpr auto is_normal[conditional_expr auto c](value auto x) noexcept; // 3
constexpr auto is_normal[logical_value auto m](value auto x) noexcept; // 3
}
constexpr auto is_normal
elementwise callable returning a logical true if and only if the element value is normal.
Definition is_normal.hpp:77

Parameters

Return value

  1. returns true if and only if x is normal
  2. returns x != 0.
  3. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_normal(wf0) = " << eve::is_normal(wf0) << "\n";
std::cout << "-> is_normal[ignore_last(2)](wf0) = " << eve::is_normal[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_normal[wf0 != 0](wf0) = " << eve::is_normal[wf0 != 0](wf0) << "\n";
std::cout << "-> is_normal[ignore_last(2)](wu0) = " << eve::is_normal[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_normal[wu0 != 0](wu0) = " << eve::is_normal[wu0 != 0](wu0) << "\n";
std::cout << "-> is_normal(wi0) = " << eve::is_normal(wi0) << "\n";
std::cout << "-> is_normal[ignore_last(2)](wi0) = " << eve::is_normal[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_normal[wi0 != 0](wi0) = " << eve::is_normal[wi0 != 0](wi0) << "\n";
}

◆ is_not_denormal

auto eve::is_not_denormal = functor<is_not_denormal_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is not denormal.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overloads
constexpr auto is_not_denormal(floating_value auto x) noexcept; // 1
constexpr auto is_not_denormal(integral_value auto x) noexcept; // 2
// Lanes masking
constexpr auto is_not_denormal[conditional_expr auto c](value auto x) noexcept; // 3
constexpr auto is_not_denormal[logical_value auto m](value auto x) noexcept; // 3
}
constexpr auto is_not_denormal
elementwise callable returning a logical true if and only if the element value is not denormal.
Definition is_not_denormal.hpp:77

Parameters

Return value

  1. Returns true if and only if x is not denormal.
  2. Always returns true.
  3. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_not_denormal(wf0) = " << eve::is_not_denormal(wf0) << "\n";
std::cout << "-> is_not_denormal[ignore_last(2)](wf0) = " << eve::is_not_denormal[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_not_denormal[wf0 != 0](wf0) = " << eve::is_not_denormal[wf0 != 0](wf0) << "\n";
std::cout << "-> is_not_denormal[ignore_last(2)](wu0) = " << eve::is_not_denormal[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_not_denormal[wu0 != 0](wu0) = " << eve::is_not_denormal[wu0 != 0](wu0) << "\n";
std::cout << "-> is_not_denormal(wi0) = " << eve::is_not_denormal(wi0) << "\n";
std::cout << "-> is_not_denormal[ignore_last(2)](wi0) = " << eve::is_not_denormal[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_not_denormal[wi0 != 0](wi0) = " << eve::is_not_denormal[wi0 != 0](wi0) << "\n";
}

◆ is_not_equal

auto eve::is_not_equal = functor<is_not_equal_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element values are not equal.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_not_equal(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_not_equal[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_not_equal[logical_value auto m](value auto x, value auto y) noexcept; // 2
// Semantic option
constexpr auto is_not_equal[numeric](/*any of the above overloads*/) noexcept; // 3
constexpr auto is_not_equal[definitely](/*any of the above overloads*/) noexcept; // 4
constexpr auto is_not_equal[definitely = tol](/*any of the above overloads*/) noexcept; // 4
}
constexpr auto is_not_equal
elementwise callable returning a logical true if and only if the element values are not equal.
Definition is_not_equal.hpp:89

Parameters

Return value

  1. Returns the logical value containing the elementwise inequality test result between x and y.
  2. The operation is performed conditionally.
  3. The expression is_not_equal[numeric](x,y) considers that Nan values are not equal.
  4. The expression is_not_equal[definitely = tol](x, y) where x and y must be floating point values, evaluates to true if and only if x is definitely not equal to y. This means that:
    • if tol is a floating value then \(|x - y| \ge \mbox{tol}\cdot \max(|x|, |y|)\)
    • if tol is a positive integral value then there are more than tol values of the type of x representable in the interval \([x, y[\).
    • if tol is omitted then the tolerance tol default to 3*eps(as(x)).
Note
Although the infix notation with != is supported, the != operator on standard scalar types is the original one and so returns bool result, not eve::logical.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_not_equal(wf0, wf1) = " << eve::is_not_equal(wf0, wf1) << "\n";
std::cout << "-> is_not_equal[ignore_last(2)](wf0, wf1) = " << eve::is_not_equal[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_not_equal[wf0 != 0](wf0, wf1) = " << eve::is_not_equal[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_not_equal[numeric](wf0, wf1) = " << eve::is_not_equal[eve::numeric](wf0, wf1) << "\n";
std::cout << "-> is_not_equal[definitely](wf0, wf1) = " << eve::is_not_equal[eve::definitely](wf0, wf1) << "\n";
std::cout << "-> is_not_equal(wu0, wu1) = " << eve::is_not_equal(wu0, wu1) << "\n";
std::cout << "-> is_not_equal[ignore_last(2)](wu0, wu1) = " << eve::is_not_equal[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_not_equal[wu0 != 0](wu0, wu1) = " << eve::is_not_equal[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_not_equal(wi0, wi1) = " << eve::is_not_equal(wi0, wi1) << "\n";
std::cout << "-> is_not_equal[ignore_last(2)](wi0, wi1) = " << eve::is_not_equal[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_not_equal[wi0 != 0](wi0, wi1) = " << eve::is_not_equal[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_not_finite

auto eve::is_not_finite = functor<is_not_finite_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element is not a finite value

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overloads
constexpr auto is_not_finite(floating_value auto x) noexcept; // 1
constexpr auto is_not_finite(integral_value auto x) noexcept; // 2
// Lanes masking
constexpr auto is_not_finite[conditional_expr auto c](value auto x) noexcept; // 3
constexpr auto is_not_finite[logical_value auto m](value auto x) noexcept; // 3
}
constexpr auto is_not_finite
elementwise callable returning a logical true if and only if the element is not a finite value
Definition is_not_finite.hpp:76

Parameters

Return value

  1. is_not_finite(x) is semantically equivalent to is_nan(x-x).
  2. Always returns false.
  1. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_not_finite(wf0) = " << eve::is_not_finite(wf0) << "\n";
std::cout << "-> is_not_finite[ignore_last(2)](wf0) = " << eve::is_not_finite[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_not_finite[wf0 != 0](wf0) = " << eve::is_not_finite[wf0 != 0](wf0) << "\n";
std::cout << "-> is_not_finite[ignore_last(2)](wu0) = " << eve::is_not_finite[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_not_finite[wu0 != 0](wu0) = " << eve::is_not_finite[wu0 != 0](wu0) << "\n";
std::cout << "-> is_not_finite(wi0) = " << eve::is_not_finite(wi0) << "\n";
std::cout << "-> is_not_finite[ignore_last(2)](wi0) = " << eve::is_not_finite[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_not_finite[wi0 != 0](wi0) = " << eve::is_not_finite[wi0 != 0](wi0) << "\n";
}

◆ is_not_flint

auto eve::is_not_flint = functor<is_not_flint_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is a floating value not representing an integer

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overloads
constexpr auto is_not_flint(floating_value auto x) ; noexcept // 1
constexpr auto is_not_flint(integer_value auto x) noexcept; // 2
// Lanes masking
constexpr auto is_not_flint[conditional_expr auto c](value auto x) noexcept; // 3
constexpr auto is_not_flint[logical_value auto m](value auto x) noexcept; // 3
}
constexpr auto is_not_flint
elementwise callable returning a logical true if and only if the element value is a floating value no...
Definition is_not_flint.hpp:74

Parameters

Return value

  1. The call is_not_flint(x) is semantically equivalent to: is_nez(frac (x)); This means that x does not represent an integer (flint is a shortcut for 'floating integer').
  2. Always returns false.
  3. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_not_flint(wf0) = " << eve::is_not_flint(wf0) << "\n";
std::cout << "-> is_not_flint[ignore_last(2)](wf0) = " << eve::is_not_flint[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_not_flint[wf0 != 0](wf0) = " << eve::is_not_flint[wf0 != 0](wf0) << "\n";
std::cout << "-> is_not_flint[ignore_last(2)](wu0) = " << eve::is_not_flint[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_not_flint[wu0 != 0](wu0) = " << eve::is_not_flint[wu0 != 0](wu0) << "\n";
std::cout << "-> is_not_flint[ignore_last(2)](wi0) = " << eve::is_not_flint[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_not_flint[wi0 != 0](wi0) = " << eve::is_not_flint[wi0 != 0](wi0) << "\n";
}

◆ is_not_greater

auto eve::is_not_greater = functor<is_not_greater_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value of the first parameter is not greater than the second one.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_not_greater(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_not_greater[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_not_greater[logical_value auto m](value auto x, value auto y) noexcept; // 2
// Semantic option
constexpr auto is_not_greater[almost](/*any of the above overloads*/) noexcept; // 3
constexpr auto is_not_greater[almost = tol](/*any of the above overloads*/) noexcept; // 3
}
constexpr auto is_not_greater
elementwise callable returning a logical true if and only if the element value of the first parameter...
Definition is_not_greater.hpp:92

Parameters

Return value

  1. The call eve::is_not_greater(x,y) is semantically equivalent to !(x < y):
  2. The operation is performed conditionally.
  3. The expression is_greater[almost = tol](x, y) where x and y must be floating point values, evaluates to true if and only if x is almost not greater than y. This means that:
    • if tol is a floating value then \(x \le y + \mbox{tol}\cdot \max(|x|, |y|)\)
    • if tol is a positive integral value then \(x \le \mbox{next}(y, \mbox{tol})\);
    • if tol is omitted then the tolerance tol default to 3*eps(as(x)).

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_not_greater(wf0, wf1) = " << eve::is_not_greater(wf0, wf1) << "\n";
std::cout << "-> is_not_greater[ignore_last(2)](wf0, wf1) = " << eve::is_not_greater[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_not_greater[wf0 != 0](wf0, wf1) = " << eve::is_not_greater[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_not_greater[almost](wf0, wf1) = " << eve::is_not_greater[eve::almost](wf0, wf1) << "\n";
std::cout << "-> is_not_greater(wu0, wu1) = " << eve::is_not_greater(wu0, wu1) << "\n";
std::cout << "-> is_not_greater[ignore_last(2)](wu0, wu1) = " << eve::is_not_greater[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_not_greater[wu0 != 0](wu0, wu1) = " << eve::is_not_greater[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_not_greater(wi0, wi1) = " << eve::is_not_greater(wi0, wi1) << "\n";
std::cout << "-> is_not_greater[ignore_last(2)](wi0, wi1) = " << eve::is_not_greater[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_not_greater[wi0 != 0](wi0, wi1) = " << eve::is_not_greater[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_not_greater_equal

auto eve::is_not_greater_equal = functor<is_not_greater_equal_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value of the first parameter is not greater or equal to the second one.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T, eve::value U >
constexpr auto is_not_greater_equal(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_not_greater_equal[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_not_greater_equal[logical_value auto m](value auto x, value auto y) noexcept; // 2
// Semantic option
constexpr auto is_not_greater_equal[definitely](/*any of the above overloads*/) noexcept; // 3
constexpr auto is_not_greater_equal[definitely = tol](/*any of the above overloads*/) noexcept; // 3
}
constexpr auto is_not_greater_equal
elementwise callable returning a logical true if and only if the element value of the first parameter...
Definition is_not_greater_equal.hpp:92

Parameters

Return value

  1. The call eve::is_not_greater_equal(x,y) is semantically equivalent to !(x >= y):
  2. The operation is performed conditionally.
  3. The expression is_not_greater_equal[definitely = tol](x, y) where x and y must be floating point values, evaluates to true if and only if x is definitely not greater than y. This means that:
    • if tol is a floating value then \(x \le y - \mbox{tol}\cdot \max(|x|, |y|)\)
    • if tol is a positive integral value then \(x \le \mbox{prev}(y, \mbox{tol})\);
    • if tol is omitted then the tolerance tol default to 3*eps(as(x)).

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_not_greater_equal(wf0, wf1) = " << eve::is_not_greater_equal(wf0, wf1) << "\n";
std::cout << "-> is_not_greater_equal[ignore_last(2)](wf0, wf1) = " << eve::is_not_greater_equal[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_not_greater_equal[wf0 != 0](wf0, wf1) = " << eve::is_not_greater_equal[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_not_greater_equal[definitely](wf0, wf1) = " << eve::is_not_greater_equal[eve::definitely](wf0, wf1) << "\n";
std::cout << "-> is_not_greater_equal(wu0, wu1) = " << eve::is_not_greater_equal(wu0, wu1) << "\n";
std::cout << "-> is_not_greater_equal[ignore_last(2)](wu0, wu1) = " << eve::is_not_greater_equal[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_not_greater_equal[wu0 != 0](wu0, wu1) = " << eve::is_not_greater_equal[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_not_greater_equal(wi0, wi1) = " << eve::is_not_greater_equal(wi0, wi1) << "\n";
std::cout << "-> is_not_greater_equal[ignore_last(2)](wi0, wi1) = " << eve::is_not_greater_equal[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_not_greater_equal[wi0 != 0](wi0, wi1) = " << eve::is_not_greater_equal[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_not_infinite

auto eve::is_not_infinite = functor<is_not_infinite_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element is not an infinite value

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_not_infinite(floating_value auto x) noexcept; // 1
constexpr auto is_not_infinite(integral_value auto x) noexcept; // 2
// Lanes masking
constexpr auto is_not_infinite[conditional_expr auto c](value auto x) noexcept; // 3
constexpr auto is_not_infinite[logical_value auto m](value auto x) noexcept; // 3
}
constexpr auto is_not_infinite
elementwise callable returning a logical true if and only if the element is not an infinite value
Definition is_not_infinite.hpp:71

Parameters

Return value

  1. The call is_not_infinite(x) is semantically equivalent to is_finite(x) || is_nan(x)
  2. Always returns true.
  3. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_not_infinite(wf0) = " << eve::is_not_infinite(wf0) << "\n";
std::cout << "-> is_not_infinite[ignore_last(2)](wf0) = " << eve::is_not_infinite[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_not_infinite[wf0 != 0](wf0) = " << eve::is_not_infinite[wf0 != 0](wf0) << "\n";
std::cout << "-> is_not_infinite(wu0) = " << eve::is_not_infinite(wu0) << "\n";
std::cout << "-> is_not_infinite[ignore_last(2)](wu0) = " << eve::is_not_infinite[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_not_infinite[wu0 != 0](wu0) = " << eve::is_not_infinite[wu0 != 0](wu0) << "\n";
std::cout << "-> is_not_infinite(wi0) = " << eve::is_not_infinite(wi0) << "\n";
std::cout << "-> is_not_infinite[ignore_last(2)](wi0) = " << eve::is_not_infinite[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_not_infinite[wi0 != 0](wi0) = " << eve::is_not_infinite[wi0 != 0](wi0) << "\n";
}

◆ is_not_less

auto eve::is_not_less = functor<is_not_less_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value of the first parameter is not less than the second one.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_not_less(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_not_less[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_not_less[logical_value auto m](value auto x, value auto y) noexcept; // 2
// Semantic option
constexpr auto is_not_less[almost](/*any of the above overloads*/) noexcept; // 3
constexpr auto is_not_less[almost = tol](/*any of the above overloads*/) noexcept; // 3
}
constexpr auto is_not_less
elementwise callable returning a logical true if and only if the element value of the first parameter...
Definition is_not_less.hpp:88

Parameters

Return value

  1. The call eve::is_not_less(x,y) is semantically equivalent to !(x < y):
  2. The operation is performed conditionally.
  3. The expression is_less[almost = tol](x, y) where x and y must be floating point values, evaluates to true if and only if x is almost not less than y. This means that:
    • if tol is a floating value then \(x \ge y - \mbox{tol}\cdot \max(|x|, |y|)\)
    • if tol is a positive integral value then \(x \ge \mbox{prev}(y, \mbox{tol})\);
    • if tol is omitted then the tolerance tol default to 3*eps(as(x)).

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_not_less(wf0, wf1) = " << eve::is_not_less(wf0, wf1) << "\n";
std::cout << "-> is_not_less[ignore_last(2)](wf0, wf1) = " << eve::is_not_less[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_not_less[wf0 != 0](wf0, wf1) = " << eve::is_not_less[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_not_less[almost](wf0, wf1) = " << eve::is_not_less[eve::almost](wf0, wf1) << "\n";
std::cout << "-> is_not_less(wu0, wu1) = " << eve::is_not_less(wu0, wu1) << "\n";
std::cout << "-> is_not_less[ignore_last(2)](wu0, wu1) = " << eve::is_not_less[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_not_less[wu0 != 0](wu0, wu1) = " << eve::is_not_less[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_not_less(wi0, wi1) = " << eve::is_not_less(wi0, wi1) << "\n";
std::cout << "-> is_not_less[ignore_last(2)](wi0, wi1) = " << eve::is_not_less[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_not_less[wi0 != 0](wi0, wi1) = " << eve::is_not_less[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_not_less_equal

auto eve::is_not_less_equal = functor<is_not_less_equal_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value of the first parameter is not less or equal to the second one.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T, eve::value U >
constexpr auto is_not_less_equal(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_not_less_equal[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_not_less_equal[logical_value auto m](value auto x, value auto y) noexcept; // 2
// Semantic option
constexpr auto is_not_less_equal[definitely](/*any of the above overloads*/) noexcept; // 3
constexpr auto is_not_less_equal[definitely = tol](/*any of the above overloads*/) noexcept; // 3
}
constexpr auto is_not_less_equal
elementwise callable returning a logical true if and only if the element value of the first parameter...
Definition is_not_less_equal.hpp:87

Parameters

Return value

  1. The call eve::is_not_less_equal(x,y) is semantically equivalent to !(x <= y):
  2. The operation is performed conditionally.
  3. The expression is_not_greater_equal[definitely = tol](x, y) where x and y must be floating point values, evaluates to true if and only if x is definitely not less than y. This means that:
    • if tol is a floating value then \(x \ge y + \mbox{tol}\cdot \max(|x|, |y|)\)
    • if tol is a positive integral value then \(x \ge \mbox{next}(y, \mbox{tol})\);
    • if tol is omitted then the tolerance tol default to 3*eps(as(x)).

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_not_less_equal(wf0, wf1) = " << eve::is_not_less_equal(wf0, wf1) << "\n";
std::cout << "-> is_not_less_equal[ignore_last(2)](wf0, wf1) = " << eve::is_not_less_equal[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_not_less_equal[wf0 != 0](wf0, wf1) = " << eve::is_not_less_equal[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_not_less_equal[definitely](wf0, wf1) = " << eve::is_not_less_equal[eve::definitely](wf0, wf1) << "\n";
std::cout << "-> is_not_less_equal(wu0, wu1) = " << eve::is_not_less_equal(wu0, wu1) << "\n";
std::cout << "-> is_not_less_equal[ignore_last(2)](wu0, wu1) = " << eve::is_not_less_equal[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_not_less_equal[wu0 != 0](wu0, wu1) = " << eve::is_not_less_equal[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_not_less_equal(wi0, wi1) = " << eve::is_not_less_equal(wi0, wi1) << "\n";
std::cout << "-> is_not_less_equal[ignore_last(2)](wi0, wi1) = " << eve::is_not_less_equal[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_not_less_equal[wi0 != 0](wi0, wi1) = " << eve::is_not_less_equal[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_not_nan

auto eve::is_not_nan = functor<is_not_nan_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is not NaN

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_not_nan(floating_value auto x) noexcept; // 1
constexpr auto is_not_nan(integral_value auto x) noexcept; // 2
// Lanes masking
constexpr auto is_not_nan[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_not_nan[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_not_nan
elementwise callable returning a logical true if and only if the element value is not NaN
Definition is_not_nan.hpp:70

Parameters

Return value

  1. is_not_nan(x) is semantically equivalent to: is_equal(x, x).
  2. Always returns true.
  3. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_not_nan(wf0) = " << eve::is_not_nan(wf0) << "\n";
std::cout << "-> is_not_nan[ignore_last(2)](wf0) = " << eve::is_not_nan[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_not_nan[wf0 != 0](wf0) = " << eve::is_not_nan[wf0 != 0](wf0) << "\n";
std::cout << "-> is_not_nan(wu0) = " << eve::is_not_nan(wu0) << "\n";
std::cout << "-> is_not_nan[ignore_last(2)](wu0) = " << eve::is_not_nan[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_not_nan[wu0 != 0](wu0) = " << eve::is_not_nan[wu0 != 0](wu0) << "\n";
std::cout << "-> is_not_nan(wi0) = " << eve::is_not_nan(wi0) << "\n";
std::cout << "-> is_not_nan[ignore_last(2)](wi0) = " << eve::is_not_nan[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_not_nan[wi0 != 0](wi0) = " << eve::is_not_nan[wi0 != 0](wi0) << "\n";
}

◆ is_odd

auto eve::is_odd = functor<is_odd_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is odd.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_odd(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_odd[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_odd[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_odd
elementwise callable returning a logical true if and only if the element value is odd.
Definition is_odd.hpp:73

Parameters

Return value

  1. returns true if and only is x is an odd integer.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_odd(wf0) = " << eve::is_odd(wf0) << "\n";
std::cout << "-> is_odd[ignore_last(2)](wf0) = " << eve::is_odd[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_odd[wf0 != 0](wf0) = " << eve::is_odd[wf0 != 0](wf0) << "\n";
std::cout << "-> is_odd(wu0) = " << eve::is_odd(wu0) << "\n";
std::cout << "-> is_odd[ignore_last(2)](wu0) = " << eve::is_odd[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_odd[wu0 != 0](wu0) = " << eve::is_odd[wu0 != 0](wu0) << "\n";
std::cout << "-> is_odd(wi0) = " << eve::is_odd(wi0) << "\n";
std::cout << "-> is_odd[ignore_last(2)](wi0) = " << eve::is_odd[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_odd[wi0 != 0](wi0) = " << eve::is_odd[wi0 != 0](wi0) << "\n";
}

◆ is_ordered

auto eve::is_ordered = functor<is_ordered_t>
inlineconstexpr

elementwise callable returning a logical true if and only no parameter is NaN.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T, eve::value U >
constexpr auto is_ordered(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_ordered[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_ordered[logical_value auto m](value auto x, value auto y) noexcept; // 2
}
constexpr auto is_ordered
elementwise callable returning a logical true if and only no parameter is NaN.
Definition is_ordered.hpp:72

Parameters

Return value

  1. The call eve::is_ordered(x,y) is semantically equivalent to is_not_nan(x) && is_not_nan(y):
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_ordered(wf0, wf1) = " << eve::is_ordered(wf0, wf1) << "\n";
std::cout << "-> is_ordered[ignore_last(2)](wf0, wf1) = " << eve::is_ordered[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_ordered[wf0 != 0](wf0, wf1) = " << eve::is_ordered[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_ordered(wu0, wu1) = " << eve::is_ordered(wu0, wu1) << "\n";
std::cout << "-> is_ordered[ignore_last(2)](wu0, wu1) = " << eve::is_ordered[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_ordered[wu0 != 0](wu0, wu1) = " << eve::is_ordered[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_ordered(wi0, wi1) = " << eve::is_ordered(wi0, wi1) << "\n";
std::cout << "-> is_ordered[ignore_last(2)](wi0, wi1) = " << eve::is_ordered[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_ordered[wi0 != 0](wi0, wi1) = " << eve::is_ordered[wi0 != 0](wi0, wi1) << "\n";
}

◆ is_pinf

auto eve::is_pinf = functor<is_pinf_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element is a positive infinite value

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_pinf(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_pinf[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_pinf[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_pinf
elementwise callable returning a logical true if and only if the element is a positive infinite value
Definition is_pinf.hpp:73

Parameters

Return value

  1. For floating entries returns true if x is equals to eve::inf(as(x)), and is always false for integral types.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, eve::minf(eve::as<double>()), -1.0, -2.0, eve::inf(eve::as<double>()), -0.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_pinf(wf0) = " << eve::is_pinf(wf0) << "\n";
std::cout << "-> is_pinf[ignore_last(2)](wf0) = " << eve::is_pinf[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_pinf[wf0 != 0](wf0) = " << eve::is_pinf[wf0 != 0](wf0) << "\n";
std::cout << "-> is_pinf(wu0) = " << eve::is_pinf(wu0) << "\n";
std::cout << "-> is_pinf[ignore_last(2)](wu0) = " << eve::is_pinf[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_pinf[wu0 != 0](wu0) = " << eve::is_pinf[wu0 != 0](wu0) << "\n";
std::cout << "-> is_pinf(wi0) = " << eve::is_pinf(wi0) << "\n";
std::cout << "-> is_pinf[ignore_last(2)](wi0) = " << eve::is_pinf[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_pinf[wi0 != 0](wi0) = " << eve::is_pinf[wi0 != 0](wi0) << "\n";
}

◆ is_positive

auto eve::is_positive = functor<is_positive_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is signed and has its sign bit not set

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
constexpr auto is_positive(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_positive[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_positive[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_positive
elementwise callable returning a logical true if and only if the element value is signed and has its ...
Definition is_positive.hpp:77

Parameters

Return value

  1. this function coincides with is_gtz on integral values, but The call is_positive(x) elementwise returns true if and only if the bit of sign (most significant bit) is not set.
  2. The operation is performed conditionally.
Note
this function coincides with is_gez on integral real values, but for floating values T, is_positive(mzero<T>) is false and if x is a Nan the result depends of the bit of sign of x which can be out of control although not undefined.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_positive(wf0) = " << eve::is_positive(wf0) << "\n";
std::cout << "-> is_positive[ignore_last(2)](wf0) = " << eve::is_positive[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_positive[wf0 != 0](wf0) = " << eve::is_positive[wf0 != 0](wf0) << "\n";
std::cout << "-> is_positive(wu0) = " << eve::is_positive(wu0) << "\n";
std::cout << "-> is_positive[ignore_last(2)](wu0) = " << eve::is_positive[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_positive[wu0 != 0](wu0) = " << eve::is_positive[wu0 != 0](wu0) << "\n";
std::cout << "-> is_positive(wi0) = " << eve::is_positive(wi0) << "\n";
std::cout << "-> is_positive[ignore_last(2)](wi0) = " << eve::is_positive[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_positive[wi0 != 0](wi0) = " << eve::is_positive[wi0 != 0](wi0) << "\n";
}

◆ is_pow2

auto eve::is_pow2 = functor<is_pow2_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is a power of 2.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
constexpr auto is_pow2(integral_value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_pow2[conditional_expr auto c](integral_value auto x) noexcept; // 2
constexpr auto is_pow2[logical_value auto m](integral_value auto x) noexcept; // 2
}
constexpr auto is_pow2
elementwise callable returning a logical true if and only if the element value is a power of 2.
Definition is_pow2.hpp:70

Parameters

Return value

  1. returns true if and only if x is an integral power of two.
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "-> is_pow2(wi0) = " << eve::is_pow2(wi0) << "\n";
std::cout << "-> is_pow2[ignore_last(2)](wi0) = " << eve::is_pow2[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_pow2[wi0 != 0](wi0) = " << eve::is_pow2[wi0 != 0](wi0) << "\n";
}

◆ is_unit

auto eve::is_unit = functor<is_unit_t>
inlineconstexpr

elementwise callable returning a logical true if and only if the element value is zero.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_unit(value auto x) noexcept; // 1
// Lanes masking
constexpr auto is_unit[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto is_unit[logical_value auto m](value auto x) noexcept; // 2
}
constexpr auto is_unit
elementwise callable returning a logical true if and only if the element value is zero.
Definition is_unit.hpp:72

Parameters

Return value

  1. The call is_unit(x) is semantically equivalent to abs(x) == 1
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "-> is_unit(wf0) = " << eve::is_unit(wf0) << "\n";
std::cout << "-> is_unit[ignore_last(2)](wf0) = " << eve::is_unit[eve::ignore_last(2)](wf0) << "\n";
std::cout << "-> is_unit[wf0 != 0](wf0) = " << eve::is_unit[wf0 != 0](wf0) << "\n";
std::cout << "-> is_unit(wu0) = " << eve::is_unit(wu0) << "\n";
std::cout << "-> is_unit[ignore_last(2)](wu0) = " << eve::is_unit[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> is_unit[wu0 != 0](wu0) = " << eve::is_unit[wu0 != 0](wu0) << "\n";
std::cout << "-> is_unit(wi0) = " << eve::is_unit(wi0) << "\n";
std::cout << "-> is_unit[ignore_last(2)](wi0) = " << eve::is_unit[eve::ignore_last(2)](wi0) << "\n";
std::cout << "-> is_unit[wi0 != 0](wi0) = " << eve::is_unit[wi0 != 0](wi0) << "\n";
}

◆ is_unordered

auto eve::is_unordered = functor<is_unordered_t>
inlineconstexpr

elementwise callable returning a logical true if and only if at least one of the parameters is NaN.

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto is_unordered(value auto x, value auto y) noexcept; // 1
// Lanes masking
constexpr auto is_unordered[conditional_expr auto c](value auto x, value auto y) noexcept; // 2
constexpr auto is_unordered[logical_value auto m](value auto x, value auto y) noexcept; // 2
}
constexpr auto is_unordered
elementwise callable returning a logical true if and only if at least one of the parameters is NaN.
Definition is_unordered.hpp:71

Parameters

Return value

  1. The call eve::is_unordered(x,y) is semantically equivalent to is_nan(x) || is_nan(y):
  2. The operation is performed conditionally.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
eve::wide wf1{0.0, -4.0, 1.0, -1.0, 2.0, -2.0, 3.0, -3.0};
eve::wide wi0{0, 1, 2, 3, -1, -2, -3, -4};
eve::wide wi1{0, -4, 1, -1, 2, -2, 3, -3};
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "<- wf1 = " << wf1 << "\n";
std::cout << "<- wi0 = " << wi0 << "\n";
std::cout << "<- wi1 = " << wi1 << "\n";
std::cout << "<- wu0 = " << wu0 << "\n";
std::cout << "<- wu1 = " << wu1 << "\n";
std::cout << "-> is_unordered(wf0, wf1) = " << eve::is_unordered(wf0, wf1) << "\n";
std::cout << "-> is_unordered[ignore_last(2)](wf0, wf1) = " << eve::is_unordered[eve::ignore_last(2)](wf0, wf1) << "\n";
std::cout << "-> is_unordered[wf0 != 0](wf0, wf1) = " << eve::is_unordered[wf0 != 0](wf0, wf1) << "\n";
std::cout << "-> is_unordered(wu0, wu1) = " << eve::is_unordered(wu0, wu1) << "\n";
std::cout << "-> is_unordered[ignore_last(2)](wu0, wu1) = " << eve::is_unordered[eve::ignore_last(2)](wu0, wu1) << "\n";
std::cout << "-> is_unordered[wu0 != 0](wu0, wu1) = " << eve::is_unordered[wu0 != 0](wu0, wu1) << "\n";
std::cout << "-> is_unordered(wi0, wi1) = " << eve::is_unordered(wi0, wi1) << "\n";
std::cout << "-> is_unordered[ignore_last(2)](wi0, wi1) = " << eve::is_unordered[eve::ignore_last(2)](wi0, wi1) << "\n";
std::cout << "-> is_unordered[wi0 != 0](wi0, wi1) = " << eve::is_unordered[wi0 != 0](wi0, wi1) << "\n";
}