3 ms·
bignum as the default integer is quite common in lots of languages[1]. Notably, Lisp, Scheme, Erlang, Python. Scheme is a bit interesting in that they have a "
by deckard1 5y ago
bignum as the default integer is quite common in lots of languages[1]. Notably, Lisp, Scheme, Erlang, Python.
Scheme is a bit interesting in that they have a "numeric tower", which contains rationals and even complex numbers (implementations were free to implement a subset of this tower, at least as far as R5RS, not sure today)
[1] https://en.wikipedia.org/wiki/List_of_arbitrary-precision_arithmetic_software#Languages https://en.wikipedia.org/wiki/List_of_arbitrary-precision_ar...
- travv0 5y agoJust to elaborate a bit, in CL, numbers are FIXNUMs by default but are promoted to BIGNUMs if needed. CL also has rational and complex numbers, which it probably got from Scheme but I'm not familiar with that history.