Scheme Programmer's Manual
NAME
fixnums  Fixnum arithmetic
LIBRARY
(import (rnrs arithmetic fixnums))
DESCRIPTION
Every implementation must define its fixnum range as a
closed interval
[−2^(w−1), 2^(w−1)−1]
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
range.
Fixnum operations perform integer arithmetic on their
fixnum arguments, but raise an exception with condition
type
&implementationrestriction
if the result is not a fixnum.
IMPLEMENTATION NOTES
 GNU Guile

Guile runs generic arithmetic faster than fixnums. If the numbers are
of a certain width (e.g. 32bit) then they should be to truncated
with
bitwiseand.
 IronScheme

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).
STANDARDS
R6RS
SEE ALSO
fixnumwidth(3)
AUTHORS
This page is part of the
schememanpages
project.
It includes materials from the RnRS documents.
More information can be found at
Index
 NAME

 LIBRARY

 DESCRIPTION

 IMPLEMENTATION NOTES

 STANDARDS

 SEE ALSO

 AUTHORS

Return to Main Contents