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

Go to the documentation of this file.
00001 /* $Id: OSParameters.h 2698 2009-06-09 04:14:07Z 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 
00097 #define OS_NEAR_EQUAL 1e-2
00098 
00099 #define OS_EPS 1e-12
00100 
00101 inline double nanKludge(){
00102         double zero = 0.0;
00103         return 0.0/zero;
00104 }
00105 
00106 #ifdef NAN 
00107 #define OSNAN NAN
00108 #elif defined NaN
00109 #define OSNAN NaN
00110 #elif defined nan
00111 #define OSNAN nan
00112 #elif defined (_MSC_VER)
00113 #include <ymath.h>
00114 #define OSNAN _Nan._Double
00115 #else
00116 #define OSNAN nanKludge() // wow, what a last resort, I don't like this!
00117 #endif
00118 
00119 
00120 
00121 
00122 
00123 #ifdef DBL_MAX
00124         #define OSDBL_MAX DBL_MAX
00125 #elif defined HUGE_VAL
00126         //#define OSDBL_MAX OSINFINITY
00127         #define OSDBL_MAX HUGE_VAL
00128 #else
00129         #define OSDBL_MAX 1e30
00130 #endif
00131 
00132 
00133 #ifdef INT_MAX
00134 #define OSINT_MAX INT_MAX
00135 #else
00136 #define OSINT_MAX 2147483647
00137 #endif
00138 
00139 #ifndef XSLT_LOCATION
00140 #define XSLT_LOCATION  OSSRCDIR;
00141 #endif
00142 
00143 #endif

Generated on Mon Aug 3 03:02:25 2009 by  doxygen 1.4.7