summaryrefslogtreecommitdiffstats
path: root/src/isinf.h
blob: b4c56f79d2303fba23e95b2a97955f36c58a3f4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef __ISINF_H__
#define __ISINF_H__

/*
 * Fix for missing std::isnormal with SOLARIS8/GCC3.2
 */
 
#if defined (SOLARIS)

	#include <ieeefp.h>
	#define isinf(x) ((fpclass(x) == FP_NINF) || (fpclass(x) == FP_PINF))
	
#elif defined(__APPLE__) && __GNUC__ == 3
#define isinf(x) __isinf(x)
#elif __cplusplus >= 201103L
# include <cmath>
# define isinf std::isinf
#endif

#endif /* __ISINF_H__ */