1 |
/** |
2 |
\file system_dep.h |
3 |
\ingroup Other |
4 |
*/ |
5 |
/* |
6 |
@(#) system_dep.h |
7 |
*/ |
8 |
|
9 |
|
10 |
#ifndef escript_system_dep_h |
11 |
#define escript_system_dep_h |
12 |
|
13 |
|
14 |
#ifdef NO_FLOAT_H |
15 |
# define DBL_EPSILON 2.2204460492503131E-16 |
16 |
# define DBL_MAX 1.7976931348623157E+308 |
17 |
# define DBL_MIN 2.2250738585072014E-308 |
18 |
#else /* for the rest of the world */ |
19 |
# include <float.h> |
20 |
#endif |
21 |
#include <limits.h> |
22 |
|
23 |
# ifdef __INTEL_COMPILER |
24 |
/* |
25 |
The Intel compiler on windows has an "improved" math library compared to the usual Visual C++ one |
26 |
In particular it has a acosh and other similar functions which aren't implemented in Visual C++ math.h |
27 |
Note you will get a compile time error if any other header (including system ones) includes math.h whilst mathimf.h |
28 |
has been included. As a result system_dep.h must be included FIRST at all times (this prevents math.h from being included). |
29 |
*/ |
30 |
# include <mathimf.h> |
31 |
# else |
32 |
# include <math.h> |
33 |
# endif |
34 |
|
35 |
#ifndef M_PI |
36 |
# define M_PI 3.14159265358979323846 |
37 |
#endif |
38 |
|
39 |
#ifndef SQRT_DBL_EPSILON |
40 |
# define SQRT_DBL_EPSILON 1.4901161193847656e-08 |
41 |
#endif |
42 |
|
43 |
#ifndef M_LN2 |
44 |
# define M_LN2 0.69314718055994530942 /* log_e 2 */ |
45 |
#endif |
46 |
|
47 |
#ifdef _WIN32 |
48 |
|
49 |
#ifndef INTERFACE_STATIC_LIB |
50 |
# ifdef ESCRIPT_EXPORTS |
51 |
# define ESCRIPT_DLL_API __declspec(dllexport) |
52 |
# else |
53 |
# define ESCRIPT_DLL_API __declspec(dllimport) |
54 |
# endif |
55 |
#endif |
56 |
|
57 |
#else |
58 |
# define ESCRIPT_DLL_API |
59 |
#endif |
60 |
|
61 |
#endif |