Next: , Previous: , Up: Top   [Contents][Index]


4 Z and Q — The Integer and Rational Numbers.

CALIB uses GMP (The GNU Multi-Precision arithmetic package) to provide all underlying arithmetic operations for both integer and rational numbers of arbitrary precision. To use GMP, one must first


#include <gmp.h>

For arbitrary precision integers, GMP provides types mpz_t, mpz_ptr and mpz_srcptr. All of the associated functions and macros begin with the mpz_ prefix.

For arbitrary precision rationals, GMP provides types mpq_t, mpq_ptr and mpq_srcptr. All of the associated functions and macros begin with the mpq_ prefix.

Refer to the GMP documentation for full details.