You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You need tu use BigInt('0xFFFFFFFFFFFFFFFF') (with a string argument), otherwise the value will be a floating point number, which cannot represent 2^64-1.
Node version v12.16.1
64-bit Windows 10 Pro v2004
The BigInt value BigInt(0xFFFFFFFFFFFFFFFF) should be 2^64 - 1 but it's evaluating as 2^64
//Example
const v1 = BigInt(0xFFFFFFFFFFFFFFFF); // 2^64 - 1
const v2 = BigInt(0x10000000000000000); // 2^64
console.log(v1 === v2);
console.log(v1,v2);
// Output
true
18446744073709551616n 18446744073709551616n
The text was updated successfully, but these errors were encountered: