Mercurial > hg > qm-dsp
view maths/nan-inf.h @ 428:68a41957200e
This file is very problematic in CLAPACK 3.2, with string handling memory problems all over the place; replace with older version from 3.1.1.1
| author | Chris Cannam <c.cannam@qmul.ac.uk> |
|---|---|
| date | Fri, 30 Sep 2016 16:22:56 +0100 |
| parents | f51af910550f |
| children | 701233f8ed41 |
line wrap: on
line source
#ifndef NAN_INF_H #define NAN_INF_H #define ISNAN(x) (sizeof(x) == sizeof(double) ? ISNANd(x) : ISNANf(x)) static inline int ISNANf(float x) { return x != x; } static inline int ISNANd(double x) { return x != x; } #define ISINF(x) (sizeof(x) == sizeof(double) ? ISINFd(x) : ISINFf(x)) static inline int ISINFf(float x) { return !ISNANf(x) && ISNANf(x - x); } static inline int ISINFd(double x) { return !ISNANd(x) && ISNANd(x - x); } #endif
