E.V.E
v2023.02.15

◆ is_unordered

eve::is_unordered = {}
inlineconstexpr

Returns a logical true if and only if at least one of the parameters is NaN.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T, eve::value U >
eve::as_logical<T> is_unordered(T x,U y) noexcept;
}
constexpr callable_is_unordered_ is_unordered
Returns a logical true if and only if at least one of the parameters is NaN.
Definition: is_unordered.hpp:63
Definition: abi.hpp:18

Parameters

Return value

The call eve::is_unordered(x,y) is semantically equivalent to eve::is_nan(x) || eve::is_nan(y):

Example

#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {0.0f, 1.0f, -1.0f, -2.0f, 2.0f,
wide_ft qf = {4.0f, 1.0f, -1.0f, 0.0f, -0.0f,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
<< "-> is_unordered(pf, qf) = " << eve::is_unordered(pf, qf) << '\n';
float xf = 4.0f;
float yf = -1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
<< "-> is_unordered(xf, yf) = " << eve::is_unordered(xf, yf) << '\n';
return 0;
}
constexpr callable_nan_ nan
Computes the IEEE NaN constant.
Definition: nan.hpp:53
constexpr callable_minf_ minf
Computes the -infinity ieee value.
Definition: minf.hpp:60
constexpr callable_inf_ inf
Computes the infinity ieee value.
Definition: inf.hpp:58
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65

Semantic Modifiers