fixnums - Fixnum arithmetic
(import (rnrs arithmetic fixnums))
Every implementation must define its fixnum range as a
such that w is a (mathematical) integer w ≥ 24. Every
mathematical integer within an implementation’s fixnum
range must correspond to an exact integer object that is
representable within the implementation. A fixnum is an
exact integer object whose value lies within this fixnum
Fixnum operations perform integer arithmetic on their
fixnum arguments, but raise an exception with condition
if the result is not a fixnum.
- GNU Guile
Guile runs generic arithmetic faster than fixnums. If the numbers are
of a certain width (e.g. 32-bit) then they should be to truncated
IronScheme stores fixnums on the heap. Remember to not use eq?,
assq or memq on fixnums. (This applies to Scheme as such,
not just IronScheme).
This page is part of the
It includes materials from the RnRS documents.
More information can be found at
Markup created by unroff 1.0sc, March 04, 2023.