![]() |
|
|
Generated: 8 Jan 2009 |
00001 // $Id: CheckForNaN.h,v 1.5 2007/10/19 10:18:23 marcocle Exp $ 00002 // ============================================================================ 00003 #ifndef GAUDIALG_CHECKFORNAN_H 00004 #define GAUDIALG_CHECKFORNAN_H 1 00005 // ============================================================================ 00006 // Include files 00007 // ============================================================================ 00008 #ifndef _WIN32 00009 #include <cmath> 00010 namespace 00011 { 00012 inline int lfin ( double x ) { return std::isfinite ( x ) ; } 00013 inline int lnan ( double x ) { return std::isnan ( x ) ; } 00014 } 00015 #else 00016 #include <float.h> 00017 namespace 00018 { 00019 inline int lfin ( double x ) { return _finite ( x ) ; } 00020 inline int lnan ( double x ) { return _isnan ( x ) ; } 00021 } 00022 #endif 00023 // ============================================================================ 00024 // The END 00025 // ============================================================================ 00026 #endif // GAUDIALG_CHECKFORNAN_H 00027 // ============================================================================