[previous] [up] [next]     [contents] [index]
Next: Library Functions Up: MzScheme Architecture Previous: Library Functions

Bignums, Rationals, and Complex Numbers

MzScheme 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 reprsented by the MzScheme 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 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 (double-precission floating-point numbers) or both exact numbers. When exact numbers are used, fixnums, bignums, and rationals can be mixed in any way.





PLT