Hacker News new | ask | show | jobs
by jrvieira 358 days ago
Unbounded 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 :)

1 comments

Unbounded 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.

In many langue’s (e.g. Python, so not even obscure languages), ints are unbounded.
That’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”.