User documentation for file utils-gmp.H
This file defines a few very basic functions which I feel should
really be part of the GMP library. Nevertheless I have placed all
definitions inside the namespace CoCoA. Here is a summary:
mpq_cmpabs(q1,q2)compare absolute values of rationalsq1andq2mpz_rounddiv(Q,N,D)-- compute Q = N/D where the quotient is rounded to an integer (currently halves round away from zero).mpq_round(N, Q)-- round rationalQto an integer; halves round the same way as inmpz_rounddiv
Maintainer documentation for file utils-gmp.H
The implementations are not exception safe. The emphasis was on obvious correctness rather than greatest speed.
Bugs, Shortcomings and other ideas
Currently mpz_rounddiv and mpq_round return a boolean saying
whether the quotient was in fact an integer.