I'm performing 55 << 30
in C# and Python 3. C# returns -1073741824
, which is what I want, but Python returns 59055800320
. Can someone explain why exactly this happens, and what I can do to fix it?
python ints are arbitrarily large ... you can force it sort of
import numpy
numpy.int32(55) << 30