CoinUtils
trunk
|
00001 /* $Id$ */ 00002 // Copyright (C) 2002, International Business Machines 00003 // Corporation and others. All Rights Reserved. 00004 // This code is licensed under the terms of the Eclipse Public License (EPL). 00005 00006 /* Defines COIN_DBL_MAX and relatives and provides CoinFinite and CoinIsnan. */ 00007 00008 #ifndef CoinFinite_H 00009 #define CoinFinite_H 00010 00011 #include <limits> 00012 00013 //============================================================================= 00014 // Smallest positive double value and Plus infinity (double and int) 00015 00016 #if 1 00017 const double COIN_DBL_MIN = std::numeric_limits<double>::min(); 00018 const double COIN_DBL_MAX = std::numeric_limits<double>::max(); 00019 const int COIN_INT_MAX = std::numeric_limits<int>::max(); 00020 const double COIN_INT_MAX_AS_DOUBLE = std::numeric_limits<int>::max(); 00021 #else 00022 #define COIN_DBL_MIN (std::numeric_limits<double>::min()) 00023 #define COIN_DBL_MAX (std::numeric_limits<double>::max()) 00024 #define COIN_INT_MAX (std::numeric_limits<int>::max()) 00025 #define COIN_INT_MAX_AS_DOUBLE (std::numeric_limits<int>::max()) 00026 #endif 00027 00029 extern bool CoinFinite(double val); 00030 00032 extern bool CoinIsnan(double val); 00033 00034 #endif