No, this is python, we don't do that here. Integers can get as big or as small as you want. unless you are using numpy or some other library which is essentially a wrapper around c code, then the library may return incorrect results
The tricky bit is those big integers are a lot slower than raw integers, and it won't warn you when it switches to them. It also means that there's one less warning sign if you have a bug that gives you huge numbers by accident. This is the trade-off of the "just handle it" versus "die gracefully" conundrum.
You can do BigIntegers in Java though, you just have to do it manually.
13
u/valzargaming Dec 03 '19 edited Dec 03 '19
This will loop approximately 2147483650 times before an underflow to positive.