pitrou commented on code in PR #36667:
URL: https://github.com/apache/arrow/pull/36667#discussion_r1266722013
##########
cpp/src/arrow/util/decimal_internal.h:
##########
@@ -464,6 +466,8 @@ struct RealTraits<double> {
static constexpr int kMantissaBits = 53;
// ceil(log10(2 ^ kMantissaBits))
static constexpr int kMantissaDigits = 16;
+ // Integers between zero and kMaxPreciseInteger can be precisely represented
+ static constexpr uint64_t kMaxPreciseInteger = 1ULL << kMantissaBits;
Review Comment:
```suggestion
static constexpr uint64_t kMaxPreciseInteger = (1ULL << kMantissaBits) - 1;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]