Irrational numbers probably can't be represented in a sane way, without going to full symbolic representation.
Ironically, it's easier to represent complex numbers with rational parts than reals.
@WomanCorn Isn't this exactly what Python does?
Python does something like this, but for integers only. In Python 2, it would auto promote from short -> long, but not auto demote back from long -> short.
In Python 3, that conversion is hidden, so I'm not sure if it still applies.
@WomanCorn Right. It would be nice if float auto-promoted to Decimal which is Python’s floating point BigInt equivalent. For what it’s worth my understanding is that in 3 all ints are treated internally as longs. I don’t think the implementation has a specific speed/memory disadvantage vs the auto promotion structure before, which is why they decided to remove bounded ints.
I'm now interested in what a programming language would look like that had a fully general number type, but used bounded numbers for speed when appropriate constraints were followed.