Scheme_Object * scheme_make_bignum(int v)
Creates a bignum representing the integer v. This is the only way that a bignum can be created for a value that fits in 31 bits. This must ony be used to create temporary values for use with the bignum functions. Final results can be normalized with scheme_bignum_normalize.
double scheme_bignum_to_float(Scheme_Object *n)
Converts a bignum to a floating-point number, with reasonable but unspecified accuracy.
Scheme_Object * scheme_bignum_from_float(double d)
Creates a bignum that is close in magnitude to the floating-point number d. The conversion accuracy is reasonable but unspecified.
char * scheme_bignum_to_string(Scheme_Object *n, int radix)
Writes a bignum into a newly allocated string.
Scheme_Object * scheme_read_bignum(char *str, int radix)
Reads a bignum from a string. If the string does not represent an integer, then NULL will be returned. If the string represents a number that fits in 31 bits, then a scheme_integer_type object will be returned.
Scheme_Object * scheme_bignum_normalize(Scheme_Object *n)
If n fits in 31 bits, then a scheme_integer_type object will be returned. Otherwise, n is returned.
Scheme_Object * scheme_make_rational(Scheme_Object *r, Scheme_Object *d)
Creates a rational from a numerator and denominator. The n and d parameters must be fixnums or bignums (possibly mixed). The resulting will be normalized (thus, an bignum or fixnum might be returned).
double scheme_rational_to_float(Scheme_Object *n)
Converts the rational n to a double.
Scheme_Object * scheme_rational_numerator(Scheme_Object *n)
Returns the numerator of the rational n.
Scheme_Object * scheme_rational_denominator(Scheme_Object *n)
Returns the denominator of the rational n.
Scheme_Object * scheme_rational_from_float(doubled)
Converts the given double into a maximally-precise rational.
Scheme_Object * scheme_make_complex(Scheme_Object *r, Scheme_Object *i)
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).
Scheme_Object * scheme_complex_real_part(Scheme_Object *n)
Returns the real part of the complex number n.
Scheme_Object * scheme_complex_imaginary_part(Scheme_Object *n)
Returns the imaginary part of the complex number n.