annotate src/dsp/nan-inf.h @ 196:da283326bcd3 tip master

Update plugin versions in RDF
author Chris Cannam <cannam@all-day-breakfast.com>
date Fri, 28 Feb 2020 09:43:02 +0000
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