3 ms·
Lisp systems also have fixnums and bignums. For example a 64bit Common Lisp: MOST-NEGATIVE-FIXNUM, value: -1152921504606846976
by lispm 9y ago
Lisp systems also have fixnums and bignums. For example a 64bit Common Lisp:
MOST-NEGATIVE-FIXNUM, value: -1152921504606846976
MOST-POSITIVE-FIXNUM, value: 1152921504606846975
Fixnums are typically stored inline in data structures (like lists, arrays and CLOS objects). Bignums will be stored as a pointer to an heap-allocated large number. Data has tags and thus in a 64bit Lisp the fixnums will be slightly smaller than 64bit. Bignums can be 'arbitrary' larger and there is automatic switching between fixnums and bignums for numeric operations.
- junke 9y agoThe range varies across implementations: the above values correspond to 60 bits; most-positive-fixnum evaluates to 4611686018427387903 in the version of SBCL I am currently running, which corresponds to 62 bits of data.