Ardour  9.0-pre0-582-g084a23a80d
nan-inf.h
Go to the documentation of this file.
1 
2 #ifndef NAN_INF_H
3 #define 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 ISINFf(float x)
Definition: nan-inf.h:10
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