All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CheckForNaN.h
Go to the documentation of this file.
1 // $Id: CheckForNaN.h,v 1.5 2007/10/19 10:18:23 marcocle Exp $
2 // ============================================================================
3 #ifndef GAUDIALG_CHECKFORNAN_H
4 #define GAUDIALG_CHECKFORNAN_H 1
5 // ============================================================================
6 // Include files
7 // ============================================================================
8 #if defined(_WIN32)
9 #include <float.h>
10 namespace
11 {
12  inline int lfin ( double x ) { return _finite ( x ) ; }
13  inline int lnan ( double x ) { return _isnan ( x ) ; }
14 }
15 #elif defined(__ICC)
16 #include <mathimf.h>
17 namespace
18 {
19  inline int lfin ( double x ) { return isfinite ( x ) ; }
20  inline int lnan ( double x ) { return isnan ( x ) ; }
21 }
22 #else // GCC
23 #include <cmath>
24 namespace
25 {
26  inline int lfin ( double x ) { return std::isfinite ( x ) ; }
27  inline int lnan ( double x ) { return std::isnan ( x ) ; }
28 }
29 #endif
30 // ============================================================================
31 // The END
32 // ============================================================================
33 #endif // GAUDIALG_CHECKFORNAN_H
34 // ============================================================================