-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
➜ type(uint120).max
Type: uint120
├ Hex: 0xffffffffffffffffffffffffffffff
├ Hex (full word): 0x0000000000000000000000000000000000ffffffffffffffffffffffffffffff
└ Decimal: 1329227995784915872903807060280344575
➜ uint256(type(uint32).max) * uint256(type(uint88).max)
Type: uint256
├ Hex: 0x0000000000000000000000000000000000fffffffeffffffffffffff00000001
├ Hex (full word): 0x0000000000000000000000000000000000fffffffeffffffffffffff00000001
└ Decimal: 1329227995475430863082461987260596225
➜ >>> (2**88-1)*(2**32-1)
1329227995475430863082461987260596225
>>> 1329227995784915872903807060280344576 - 1329227995475430863082461987260596225
309485009821345073019748351
>>> hex(1329227995784915872903807060280344576)
'0x1000000000000000000000000000000'
>>> hex(1329227995475430863082461987260596225)
'0xfffffffeffffffffffffff00000001'
>>> 2**120-1
1329227995784915872903807060280344575
>>> hex(1329227995784915872903807060280344575)
'0xffffffffffffffffffffffffffffff'Meaning we can represent the values safely (until 2106)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels