Mercurial > hg > constant-q-cpp
annotate src/dsp/nan-inf.h @ 192:60b34c5c650f
Fix links
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 21 Jun 2017 08:43:59 +0100 |
parents | 2375457f2876 |
children |
rev | line source |
---|---|
c@121 | 1 |
c@121 | 2 #ifndef NAN_INF_H |
c@121 | 3 #define NAN_INF_H |
c@121 | 4 |
c@121 | 5 #define ISNAN(x) (sizeof(x) == sizeof(double) ? ISNANd(x) : ISNANf(x)) |
c@121 | 6 static inline int ISNANf(float x) { return x != x; } |
c@121 | 7 static inline int ISNANd(double x) { return x != x; } |
c@121 | 8 |
c@121 | 9 #define ISINF(x) (sizeof(x) == sizeof(double) ? ISINFd(x) : ISINFf(x)) |
c@121 | 10 static inline int ISINFf(float x) { return !ISNANf(x) && ISNANf(x - x); } |
c@121 | 11 static inline int ISINFd(double x) { return !ISNANd(x) && ISNANd(x - x); } |
c@121 | 12 |
c@121 | 13 #endif |