domoritz commented on code in PR #40729:
URL: https://github.com/apache/arrow/pull/40729#discussion_r1534954046
##########
js/src/util/bn.ts:
##########
@@ -68,25 +68,36 @@ Object.assign(SignedBigNum.prototype, BigNum.prototype, {
'constructor': SignedB
Object.assign(UnsignedBigNum.prototype, BigNum.prototype, { 'constructor':
UnsignedBigNum, 'signed': false, 'TypedArray': Uint32Array, 'BigIntArray':
BigUint64Array });
Object.assign(DecimalBigNum.prototype, BigNum.prototype, { 'constructor':
DecimalBigNum, 'signed': true, 'TypedArray': Uint32Array, 'BigIntArray':
BigUint64Array });
+//FOR ES2020 COMPATIBILITY
+const TWO_TO_THE_64 = BigInt(4294967296) * BigInt(4294967296); // 2^32 * 2^32
= 0x10000000000000000n
Review Comment:
Why not just this?
```suggestion
const TWO_TO_THE_64 = BigInt(2) ** BigInt(64); // 2^64 = 0x10000000000000000n
```
--
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]