6 ms·
> Well, Python supports arbitrary precision integers. And some other niche languages (Sail is one I know). As a Lisper, I very carefully chose an example to ac
by tmtvl 2y ago
> Well, Python supports arbitrary precision integers. And some other niche languages (Sail is one I know).
As a Lisper, I very carefully chose an example to account for arbitrary-precision integers (so X + X where X is, say, 8^8^8^8 (remember, exponentiation is right-associative, 8^8^8^8 = 8^(8^(8^8)))).
> I don't think "running out of memory" counts as a caveat because it still won't give the wrong answer.
Being pedantic, it doesn't give the _correct_ answer either, because in mathematics 'ran out of memory' is not the correct answer for any addition.
- IshKebab 2y agoRight, but you can never guarantee giving the correct answer. What if someone unplugs the power mid-computation? That's basically where running out of memory is (for a modern desktop system anyway). The best you do is "not the wrong answer".