/[escript]/trunk/escript/src/system_dep.h
ViewVC logotype

Contents of /trunk/escript/src/system_dep.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1031 - (show annotations)
Wed Mar 14 06:03:21 2007 UTC (12 years, 7 months ago) by phornby
File MIME type: text/plain
File size: 1518 byte(s)
Finer control of the inverse hyp. functions.


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

  ViewVC Help
Powered by ViewVC 1.1.26