MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / builtin_isnan

Function builtin_isnan

extern/half/include/half.hpp:426–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424 /// \retval true if not a number
425 /// \retval false else
426 template<typename T> bool builtin_isnan(T arg)
427 {
428 #if HALF_ENABLE_CPP11_CMATH
429#ifdef __clang__
430#pragma GCC diagnostic push
431#pragma GCC diagnostic ignored "-Wtautological-constant-compare"
432#endif
433 return std::isnan(arg);
434#ifdef __clang__
435#pragma GCC diagnostic pop
436#endif
437 #elif defined(_MSC_VER)
438 return ::_isnan(static_cast<double>(arg)) != 0;
439 #else
440 return arg != arg;
441 #endif
442 }
443
444 /// Check sign.
445 /// \tparam T argument type (builtin floating point type)

Callers 7

float2half_implFunction · 0.85
remainderMethod · 0.85
remquoMethod · 0.85
cbrtMethod · 0.85
nexttowardMethod · 0.85
fminMethod · 0.85
fmaxMethod · 0.85

Calls 1

isnanFunction · 0.70

Tested by

no test coverage detected