Osi 0.107.7

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CoinFinite.hpp
Go to the documentation of this file.
1 /* $Id: CoinFinite.hpp 1762 2014-12-29 20:37:12Z tkr $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5
6 /* Defines COIN_DBL_MAX and relatives and provides CoinFinite and CoinIsnan. */
7
8 #ifndef CoinFinite_H
9 #define CoinFinite_H
10
11 #include <limits>
12
13 //=============================================================================
14 // Smallest positive double value and Plus infinity (double and int)
15
16 #if 1
17 const double COIN_DBL_MIN = (std::numeric_limits<double>::min)();
18 const double COIN_DBL_MAX = (std::numeric_limits<double>::max)();
19 const int COIN_INT_MAX = (std::numeric_limits<int>::max)();
20 const double COIN_INT_MAX_AS_DOUBLE = (std::numeric_limits<int>::max)();
21 #else
22 #define COIN_DBL_MIN (std::numeric_limits<double>::min())
23 #define COIN_DBL_MAX (std::numeric_limits<double>::max())
24 #define COIN_INT_MAX (std::numeric_limits<int>::max())
25 #define COIN_INT_MAX_AS_DOUBLE (std::numeric_limits<int>::max())
26 #endif
27
29 extern bool CoinFinite(double val);
30
32 extern bool CoinIsnan(double val);
33
34 #endif
CoinIsnan
bool CoinIsnan(double val)
checks if a double value is not a number
COIN_INT_MAX_AS_DOUBLE
const double COIN_INT_MAX_AS_DOUBLE
Definition: CoinFinite.hpp:20
COIN_DBL_MIN
const double COIN_DBL_MIN
Definition: CoinFinite.hpp:17
COIN_INT_MAX
const int COIN_INT_MAX
Definition: CoinFinite.hpp:19
CoinFinite
bool CoinFinite(double val)
checks if a double value is finite (not infinity and not NaN)
COIN_DBL_MAX
const double COIN_DBL_MAX
Definition: CoinFinite.hpp:18