14Bignums, Rationals, and Complex Numbers

Racket supports integers of an arbitrary magnitude; when an integer
cannot be represented as a fixnum (i.e., 30 or 62 bits plus a sign
bit), then it is represented by the Racket type
scheme_bignum_type. There is no overlap in integer values
represented by fixnums and bignums.

Rationals are implemented by the type scheme_rational_type,
composed of a numerator and a denominator.
The numerator and denominator will be fixnums or bignums (possibly mixed).

Complex numbers are implemented by the type scheme_complex_type,
composed of a real and imaginary part. The real and imaginary parts
will either be both flonums, both exact numbers (fixnums, bignums, and
rationals can be mixed in any way), or the real part will be exact 0 and
the imaginary part will be a single-precision (when enabled) or
double-pecision flonum.

Creates a bignum representing the integer v. This can create a
bignum that otherwise fits into a fixnum. This must only be used to
create temporary values for use with the bignum functions. Final
results can be normalized with scheme_bignum_normalize. Only
normalized numbers can be used with procedures that are not specific
to bignums.

Reads a bignum from a mzchar string, starting from position
offset in str. If the string does not represent an
integer, then NULL will be returned. If the string represents a
number that fits in a fixnum, then a scheme_integer_type
object will be returned.

Creates a complex number from real and imaginary parts. The r
and i arguments must be fixnums, bignums, flonums, or rationals
(possibly mixed). The resulting number will be normalized (thus, a real
number might be returned).