nan-inf.h
Go to the documentation of this file.
1 
2 #ifndef QM_DSP_NAN_INF_H
3 #define QM_DSP_NAN_INF_H
4 
5 #define ISNAN(x) (sizeof(x) == sizeof(double) ? ISNANd(x) : ISNANf(x))
6 static inline int ISNANf(float x) { return x != x; }
7 static inline int ISNANd(double x) { return x != x; }
8 
9 #define ISINF(x) (sizeof(x) == sizeof(double) ? ISINFd(x) : ISINFf(x))
10 static inline int ISINFf(float x) { return !ISNANf(x) && ISNANf(x - x); }
11 static inline int ISINFd(double x) { return !ISNANd(x) && ISNANd(x - x); }
12 
13 #endif
static int ISINFd(double x)
Definition: nan-inf.h:11
static int ISNANd(double x)
Definition: nan-inf.h:7
static int ISNANf(float x)
Definition: nan-inf.h:6
static int ISINFf(float x)
Definition: nan-inf.h:10