A smob is a miscellaneous datatype. The type code and GCMARK bit
occupy the lower order 16 bits of the
CAR half of the cell. The
rest of the
CAR can be used for sub-type or other information.
CDR contains data of size long and is often a pointer to
Like ptobs, new varieties of smobs can be defined dynamically (see Defining Smobs). These are the initial smobs:
unused cell on the freelist.
Inexact number data types are subtypes of type
tc16_flo. If the
CDRis a pointer to a
CDRis a pointer to a
malloced pair of doubles.
positive and negative bignums, respectively.
Scm has large precision integers called bignums. They are stored in
sign-magnitude form with the sign occuring in the type code of the SMOBs
bigpos and bigneg. The magnitude is stored as a
BIGDIG which must be an unsigned integral type with size
BIGRAD is the radix associated with
NUMDIGS_MAX (defined in scmfig.h) limits the number of
digits of a bignum to 1000. These digits are base
is typically 65536, giving 4816 decimal digits.
Why only 4800 digits? The simple multiplication algorithm SCM uses is O(n^2); this means the number of processor instructions required to perform a multiplication is some multiple of the product of the number of digits of the two multiplicands.
digits * digits ==> operations 5 x 50 100 * x 500 10000 * x 5000 1000000 * x
To calculate numbers larger than this, FFT multiplication [O(n*log(n))] and other specialized algorithms are required. You should obtain a package which specializes in number-theoretical calculations:
made by DELAY. See Control features in Revised(5) Scheme.
synchronization object. See Process Synchronization.
macro expanding function. See Macro Primitives.
multi-dimensional array. See Arrays.
This type implements both conventional arrays (those with arbitrary data as elements see Conventional Arrays) and uniform arrays (those with elements of a uniform type see Uniform Array).
Conventional Arrays have a pointer to a vector for their
Uniform Arrays have a pointer to a Uniform Vector type (string, Vbool,
VfixZ32, VfixN32, VfloR32, VfloR64, or VfloC64) in their