| 418 | /// \retval true if not a number |
| 419 | /// \retval false else |
| 420 | template<typename T> bool builtin_isnan(T arg) |
| 421 | { |
| 422 | #if HALF_ENABLE_CPP11_CMATH |
| 423 | return std::isnan(arg); |
| 424 | #elif defined(_MSC_VER) |
| 425 | return ::_isnan(static_cast<double>(arg)) != 0; |
| 426 | #else |
| 427 | return arg != arg; |
| 428 | #endif |
| 429 | } |
| 430 | |
| 431 | /// Check sign. |
| 432 | /// \tparam T argument type (builtin floating point type) |
no test coverage detected