OSParameters.h
Go to the documentation of this file.
1 
17 // CoinFinite includes <cmath> (I think) which causes a problem
18 //#include<CoinFinite.hpp>
19 
20 //kipp fix up the infinity issue
21 //kipp define OSINFINITY to COIN_DBL_MAX
22 
23 
24 
25 #ifndef OSPARAMETERS
26 #define OSPARAMETERS
27 
28 #include "OSConfig.h"
29 
30 
31 
32 #ifdef HAVE_CMATH
33 # include <cmath>
34 #else
35 # ifdef HAVE_MATH_H
36 # include <math.h>
37 # else
38 # error "don't have header file for math"
39 # endif
40 #endif
41 #ifdef HAVE_CFLOAT
42 # include <cfloat>
43 #else
44 # ifdef HAVE_FLOAT_H
45 # include <float.h>
46 # endif
47 #endif
48 #ifdef HAVE_CIEEEFP
49 # include <cieeefp>
50 #else
51 # ifdef HAVE_IEEEFP_H
52 # include <ieeefp.h>
53 # endif
54 #endif
55 
56 #ifdef HAVE_CSTRING
57 # include <cstring>
58 #else
59 # ifdef HAVE_STRING_H
60 # include <string.h>
61 # else
62 # error "don't have header file for string"
63 # endif
64 #endif
65 
66 
67 #ifdef HAVE_CSTDLIB
68 # include <cstdlib>
69 #else
70 # ifdef HAVE_STDLIB_H
71 # include <stdlib.h>
72 # endif
73 #endif
74 
75 
76 
77 
78 
79 //#include <limits.h>
80 //#ifdef INFINITY //This is the definition in the ISO C99 standard.
81 // #define OSINFINITY INFINITY
82 //#else
83 // #define OSINFINITY 1e20
84 //#endif
85 
86 //#define OSINFINITY 1e30
87 
88 #define OS_E_VALUE exp(1.0)
89 #define OS_PI_VALUE 2*asin(1.0)
90 
91 #define OS_SCHEMA_VERSION "2.0"
92 
97 #define OS_NEAR_EQUAL 1e-2
98 
99 #ifdef NAN
100  #define OSNAN NAN
101 #elif defined NaN
102  #define OSNAN NaN
103 #elif defined nan
104  #define OSNAN nan
105 #else
106  #define OSNAN -883849830
107 #endif
108 
109 #ifdef DBL_MAX
110  #define OSDBL_MAX DBL_MAX
111 #elif defined HUGE_VAL
112  //#define OSDBL_MAX OSINFINITY
113  #define OSDBL_MAX HUGE_VAL
114 #else
115  #define OSDBL_MAX 1e30
116 #endif
117 
118 
119 #ifdef INT_MAX
120  #define OSINT_MAX INT_MAX
121 #else
122  #define OSINT_MAX 2147483647
123 #endif
124 
125 #ifndef XSLT_LOCATION
126  #define XSLT_LOCATION OSSRCDIR;
127 #endif
128 
129 #endif