Possible documentation problems.

Chris Saunders evas at mountaincable.net
Tue Apr 11 16:06:16 CEST 2006


Thanks for the response Torbjörn.  I now see that both _mpq_cmp_ui and
mpq_cmp_ui and I assume they are supposed to accomplish the same thing.  Can
I ask why both are defined and what the relative advantages are?  Sorry if
this question appears stupid but I am not at all expert at C.  I write an
interface to GMP from the computer language Eiffel.  My knowledge of C is
mostly from building this interface.

Regards
Chris Saunders

-----Original Message-----
From: tege at king.swox.se [mailto:tege at king.swox.se] On Behalf Of Torbjorn
Granlund
Sent: Tuesday, April 11, 2006 8:27 AM
To: Chris Saunders
Cc: gmp-discuss at swox.com
Subject: Re: Possible documentation problems.

"Chris Saunders" <evas at mountaincable.net> writes:

  I've been looking at the GMP documentation and think I have found
  some inaccuracies.
  
  It is claimed under Rational Number Functions->Comparing Rationals:
  that the functions mpq_cmp_ui and mpq_cmp_si are macros.
  When I look at the header and source files these do not seem to me
  to be macros.  It is possible that I am incorrect as I am not an expert
  at the language C.  I have also run into this with some of the integer
  functions but don't recall the specific functions.
  
Around line 2095 in gmp-h.in you'll see that they are indeed macros.

-- 
Torbjörn



More information about the gmp-discuss mailing list