move definition of MAXBIGINT_DOUBLE to variable.cpp
This commit is contained in:
@ -95,8 +95,6 @@ typedef int64_t bigint;
|
||||
#define MAXSMALLINT INT_MAX
|
||||
#define MAXTAGINT INT_MAX
|
||||
#define MAXBIGINT INT64_MAX
|
||||
// INT64_MAX cannot be represented with a double. reduce to avoid overflow when casting back.
|
||||
#define MAXBIGINT_DOUBLE (INT64_MAX-512)
|
||||
|
||||
#define MPI_LMP_TAGINT MPI_INT
|
||||
#define MPI_LMP_IMAGEINT MPI_INT
|
||||
@ -134,8 +132,6 @@ typedef int64_t bigint;
|
||||
#define MAXSMALLINT INT_MAX
|
||||
#define MAXTAGINT INT64_MAX
|
||||
#define MAXBIGINT INT64_MAX
|
||||
// INT64_MAX cannot be represented with a double. reduce to avoid overflow when casting back.
|
||||
#define MAXBIGINT_DOUBLE (INT64_MAX-512)
|
||||
|
||||
#define MPI_LMP_TAGINT MPI_LL
|
||||
#define MPI_LMP_IMAGEINT MPI_LL
|
||||
@ -172,7 +168,6 @@ typedef int bigint;
|
||||
#define MAXSMALLINT INT_MAX
|
||||
#define MAXTAGINT INT_MAX
|
||||
#define MAXBIGINT INT_MAX
|
||||
#define MAXBIGINT_DOUBLE INT_MAX
|
||||
|
||||
#define MPI_LMP_TAGINT MPI_INT
|
||||
#define MPI_LMP_IMAGEINT MPI_INT
|
||||
|
||||
@ -73,7 +73,14 @@ enum{DONE,ADD,SUBTRACT,MULTIPLY,DIVIDE,CARAT,MODULO,UNARY,
|
||||
enum{SUM,XMIN,XMAX,AVE,TRAP,SLOPE};
|
||||
|
||||
|
||||
#define BIG 1.0e20
|
||||
static constexpr double BIG = 1.0e20;
|
||||
|
||||
// INT64_MAX cannot be represented with a double. reduce to avoid overflow when casting back.
|
||||
#if defined(LAMMPS_SMALLBIG) || defined(LAMMPS_BIGBIG)
|
||||
static constexpr double MAXBIGINT_DOUBLE = (double) (MAXBIGINT-512);
|
||||
#else
|
||||
static constexpr double MAXBIGINT_DOUBLE = (double) MAXBIGINT;
|
||||
#endif
|
||||
|
||||
// constants for variable expressions. customize by adding new items.
|
||||
// if needed (cf. 'version') initialize in Variable class constructor.
|
||||
|
||||
Reference in New Issue
Block a user