E.V.E
v2023.02.15

◆ is_not_finite

eve::is_not_finite = {}
inlineconstexpr

Returns a logical true if and only if the element is not a finite value.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T >
eve::as_logical<T> is_not_finite(T x) noexcept;
}
constexpr callable_is_not_finite_ is_not_finite
Returns a logical true if and only if the element is not a finite value.
Definition: is_not_finite.hpp:68
Definition: abi.hpp:18

Parameters

Return value

For real entries the call is_not_finite(x) is semantically equivalent to:

if constexpr(floating_value<T>) return is_nan(x-x);
else constexpr(integral_value<T>) return false_(as(x));
Definition: value.hpp:83
Definition: value.hpp:42
constexpr callable_false__ false_
Computes the false logical value.
Definition: false.hpp:52
constexpr callable_is_nan_ is_nan
Returns a logical true if and only if the element value is NaN.
Definition: is_nan.hpp:69
Lightweight type-wrapper.
Definition: as.hpp:29

For complex entries is_infinite(z) is semantically equivalent to eve::is_not_finite(real(z)) || eve::is_not_finite(imag(z)),

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,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> is_not_finite(pf) = " << eve::is_not_finite(pf) << '\n';
float xf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> is_not_finite(xf) = " << eve::is_not_finite(xf) << '\n'
<< "<- yf = " << yf << '\n'
<< "-> is_not_finite(yf) = " << eve::is_not_finite(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_mindenormal_ mindenormal
Computes the smallest denormal positive value.
Definition: mindenormal.hpp:59
constexpr callable_inf_ inf
Computes the infinity ieee value.
Definition: inf.hpp:58
Wrapper for SIMD registers.
Definition: wide.hpp:65

Semantic Modifiers