3 ms·
Proper integers aren’t bounded. Computer ints are.
by neepi 1y ago
Proper integers aren’t bounded. Computer ints are.
- jrvieira 1y agoUnbounded integer types exist, which have infinite precision in theory and are only limited by available memory in practice. You can make the argument that "proper" integers are also bounded in practice by limitations of our universe :)
- layer8 1y agoUnbounded integer types aren't ints. The important point is that the arithmetic operators on int perform modulo arithmetics, not the normal arithmetics you would expect on unbounded integers. This is often not explained when first teaching ints.
- adastra22 1y agoIn many langue’s (e.g. Python, so not even obscure languages), ints are unbounded.
- layer8 1y agoThat’s not the notion of ints the article, nor GP by “computer ints”, was referring to. Python is rather atypical in its nomenclature here. Arbitrary-precision integers are generally called “integer” or something like “bigint”.