view maths/nan-inf.h @ 94:2f42a967fd82 qm-vamp-plugins-v1.7

Call for 10.4 version min; don't use visibility=hidden (we do this at link time with exported symbols list)
author Chris Cannam
date Tue, 05 Apr 2011 12:35:36 +0100
parents c313a173f4a9
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