/home/coin/SVN-release/OS-2.1.0/OS/src/OSUtils/OSParameters.h

Go to the documentation of this file.
00001 /* $Id: OSParameters.h 3354 2010-03-28 00:43:53Z kmartin $ */
00018 // CoinFinite includes <cmath> (I think) which causes a problem 
00019 //#include<CoinFinite.hpp>
00020 
00021 //kipp fix up the infinity issue
00022 //kipp define OSINFINITY to COIN_DBL_MAX
00023 
00024 
00025 
00026 #ifndef OSPARAMETERS
00027 #define OSPARAMETERS
00028 
00029 #include "OSConfig.h"
00030 
00031 
00032 #ifdef HAVE_CMATH
00033 # include <cmath>
00034 #else
00035 # ifdef HAVE_MATH_H
00036 #  include <math.h>
00037 # else
00038 #  error "don't have header file for math"
00039 # endif
00040 #endif
00041 #ifdef HAVE_CFLOAT
00042 # include <cfloat>
00043 #else
00044 # ifdef HAVE_FLOAT_H
00045 #  include <float.h>
00046 # endif
00047 #endif
00048 #ifdef HAVE_CIEEEFP
00049 # include <cieeefp>
00050 #else
00051 # ifdef HAVE_IEEEFP_H
00052 #  include <ieeefp.h>
00053 # endif
00054 #endif
00055 
00056 #ifdef HAVE_CSTRING
00057 # include <cstring>
00058 #else
00059 # ifdef HAVE_STRING_H
00060 #  include <string.h>
00061 # else
00062 #  error "don't have header file for string"
00063 # endif
00064 #endif
00065 
00066 
00067 #ifdef HAVE_CSTDLIB
00068 # include <cstdlib>
00069 #else
00070 # ifdef HAVE_STDLIB_H
00071 #  include <stdlib.h>
00072 # endif
00073 #endif
00074 
00075 
00076 
00077 
00078 
00079 //#include <limits.h>
00080 //#ifdef INFINITY //This is the definition in the ISO C99 standard.
00081 //      #define OSINFINITY INFINITY
00082 //#else
00083 //      #define OSINFINITY 1e20
00084 //#endif
00085 
00086 //#define OSINFINITY 1e30
00087 
00088 #define OS_E_VALUE exp(1.0)
00089 #define OS_PI_VALUE 2*asin(1.0)
00090 
00091 #define OS_SCHEMA_VERSION "2.0"
00092 #define OS_RELEASE_MESSAGE "Optimization Services Release 2.1.0"
00093 
00098 #define OS_NEAR_EQUAL 1e-2
00099 
00100 #define OS_EPS 1e-12
00101 
00102 inline double nanKludge(){
00103         double zero = 0.0;
00104         return 0.0/zero;
00105 }
00106 
00107 #ifdef NAN 
00108 #define OSNAN NAN
00109 #elif defined NaN
00110 #define OSNAN NaN
00111 #elif defined nan
00112 #define OSNAN nan
00113 #elif defined (_MSC_VER)
00114 #include <ymath.h>
00115 #define OSNAN _Nan._Double
00116 #else
00117 #define OSNAN nanKludge() // wow, what a last resort, I don't like this!
00118 #endif
00119 
00120 
00121 
00122 
00123 
00124 #ifdef DBL_MAX
00125         #define OSDBL_MAX DBL_MAX
00126 #elif defined HUGE_VAL
00127         //#define OSDBL_MAX OSINFINITY
00128         #define OSDBL_MAX HUGE_VAL
00129 #else
00130         #define OSDBL_MAX 1e30
00131 #endif
00132 
00133 
00134 #ifdef INT_MAX
00135 #define OSINT_MAX INT_MAX
00136 #else
00137 #define OSINT_MAX 2147483647
00138 #endif
00139 
00140 #ifndef XSLT_LOCATION
00141 #define XSLT_LOCATION  OSSRCDIR;
00142 #endif
00143 
00144 #endif

Generated on Tue Mar 30 03:04:42 2010 by  doxygen 1.4.7