JavaScript’s number
can represent 18446744073709552000
> n = '18446744073709552000'
> Number(n)
18446744073709552000
> String(Number(n)) === n
true
So I would expect BigInt(18446744073709552000)
to return 18446744073709552000n
but it actually returns 18446744073709551616n
.