You don't know

This code produces "true":
((2147483647 + (1024 * 1024 * 1024 * 8)) | 0) == 2147483647

@alexcleac
hm, that's 31.. so the 32th bit is a type bit? It says whether this is an int or an object pointer?

@Wolf480pl it may be 🤔I didn't think deep to understand, why 31 and not 32, I am trying to find the source of collision I've been experiencing at work :)

@alexcleac @Wolf480pl
Replace |0 with &0xffffffff and it is also true in Python. |0 coerces to int32

Sign in to participate in the conversation
Mastodon for Tech Folks

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!