I just finished a post related to the top range of integer values that are supported by Swift.
The conclusion was that we can use the Decimal type to hold integer values with up to nearly 128 bits. That’s an impressively large number.
It’s hard to imagine a case where you would require both a larger number and precision at the least significant figures. However, it does make an interesting exercise so let’s give it a shot.
I recently wanted to use some very large numbers in Swift and quickly came across some limitations.
My first implementation started out naively with Int (Int64) type. This is, after all, the easiest way to use integers.
The limitations are also easy to understand.
Read More »