SlowDown Algorithmic Regularization (SDAR)
Algorithmic Regularization with slowdown method for integrating few-body motions
Float.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <limits>
4 
5 #ifdef USE_QD
6 #include <qd/qd_real.h>
7 #include <qd/qd_inline.h>
8 typedef qd_real Float;
9 const Float ROUND_OFF_ERROR_LIMIT=1e-60;
10 const Float NUMERIC_FLOAT_MAX = std::numeric_limits<double>::max();;
11 const int WRITE_WIDTH=68;
12 const int WRITE_PRECISION=60;
13 
14 #elif USE_DD
15 #include <qd/dd_real.h>
16 #include <qd/dd_inline.h>
17 typedef dd_real Float;
18 const Float ROUND_OFF_ERROR_LIMIT=1e-30;
19 const Float NUMERIC_FLOAT_MAX = std::numeric_limits<double>::max();
20 const int WRITE_WIDTH=38;
21 const int WRITE_PRECISION=30;
22 
23 #else
24 #include <limits>
25 typedef double Float;
26 #define to_int(x) int(x)
27 #define to_double(x) double(x)
29 const Float NUMERIC_FLOAT_MAX = std::numeric_limits<Float>::max();
30 const int WRITE_WIDTH=23;
31 const int WRITE_PRECISION=14;
32 
33 using std::sqrt;
34 using std::abs;
35 using std::pow;
36 using std::atan2;
37 using std::acos;
38 using std::sin;
39 using std::cos;
40 //#ifndef __INTEL_COMPILER
41 //using std::isnan;
42 //using std::isinf;
43 //#endif
44 #endif
45 
46 #if (defined USE_QD) || (defined USE_DD)
47 #define ISNAN(x) isnan(x)
48 #define ISINF(x) isinf(x)
49 #else
50 #define ISNAN(x) std::isnan(x)
51 #define ISINF(x) std::isinf(x)
52 #endif
NUMERIC_FLOAT_MAX
const Float NUMERIC_FLOAT_MAX
Definition: Float.h:29
WRITE_WIDTH
const int WRITE_WIDTH
Definition: Float.h:30
ROUND_OFF_ERROR_LIMIT
const Float ROUND_OFF_ERROR_LIMIT
Definition: Float.h:28
Float
double Float
Definition: Float.h:25
WRITE_PRECISION
const int WRITE_PRECISION
Definition: Float.h:31