-
Notifications
You must be signed in to change notification settings - Fork 377
Open
Description
test case
120222480553230655 and 120222480553230660 produces the same hex string result. this is because https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER.
these 2 integers are still in 64bit integer range, so it is a common use case.
> parseInt('120222480553230655').toString(16)
'1ab1db587644140'
> parseInt('120222480553230660').toString(16)
'1ab1db587644140'
> BigInt('120222480553230655').toString(16)
'1ab1db58764413f'
> BigInt('120222480553230660').toString(16)
'1ab1db587644144'
Metadata
Metadata
Assignees
Labels
No labels