move definition of MAXBIGINT_DOUBLE to variable.cpp

This commit is contained in:
Axel Kohlmeyer
2023-02-14 15:37:59 -05:00
parent 9c7ba5a329
commit d13634cd6b
2 changed files with 8 additions and 6 deletions

View File

@ -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.