On Sun, Sep 11, 2022 at 9:31 AM Douglas McIlroy <
douglas.mcilroy@dartmouth.edu> wrote:
> [Algol 68's presupposition is visible in declarations like "long long
> long ... int". An implementation need support only a limited number of
> "longs",
To clarify things for A68 n00bs, you can *write* an indefinite number of
"longs", but after an implementation-defined point they don't add any
further range (and/or precision in the case of floats). This is true in a
truncated way in C as well, where "long" (which is the same as "long int")
may be the same as "int".
> but each supported variety must have a definite maximum
> value, which is returned by an "environment enquiry" function. For
> amusement, consider the natural idea of implementing the longest
> variety with bignums.]
>
In actual bignum implementations, there is a biggest bignum, but it may not
be possible to actually construct it. In GMP using 64-bit digits, it is
theoretically 2^((2^31 - 1) * (2^64 - 1)), or
2^39,614,081,238,685,424,720,914,939,905, which is Very Big Indeed. But
there is nothing preventing an implementer from watching intermediate
results and throwing an exception if they get too big.