#elif SIZEOF_LONG == 8
static const int scaleShift = 32;
#endif
- static const long scale = (1 << scaleShift);
+ static const long scale = (1L << scaleShift);
static const long scaleBitmask = scale - 1;
static const long halfScale = scale / 2;
static const double dInvScale = 1. / scale;