2#include <ossia/detail/config.hpp>
9OSSIA_INLINE
bool safe_isnan(
double val)
noexcept
11#if __FINITE_MATH_ONLY__
13 return std::isnan(val);
14#elif defined(__APPLE__)
16#elif defined(__EMSCRIPTEN__)
17 return __fpclassifyl(val) == FP_NAN;
27 return ((
unsigned)(num.bits >> 32) & 0x7fffffff) + ((unsigned)num.bits != 0)
31 return std::isnan(val);
35OSSIA_INLINE
bool safe_isinf(
double val)
noexcept
37#if __FINITE_MATH_ONLY__
39 return std::isinf(val);
40#elif defined(__APPLE__)
42#elif defined(__EMSCRIPTEN__)
43 return __fpclassifyl(val) == FP_INFINITE;
53 return ((
unsigned)(num.bits >> 32) & 0x7fffffff) == 0x7ff00000
54 && (unsigned)num.bits == 0;
57 return std::isinf(val);