blob: 2522ba383575c9807987b450e1264d57e330d7ed (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 | #include <cmath>
#if defined(__GNUC__)
bool __attribute__ ((noinline)) nanp(double value)
#elif defined(_WIN32)
__declspec(noinline) bool nanp(double value)
#else
bool nanp(double value)
#endif
{
    using std::isnan;
    using std::isinf;
    const volatile double x = value;
    return isnan(x) || isinf(x);
}
 |