
The documentation of GMP 4.0.1 mentions the availability of several cmp() functions, such as
- Function: int cmp (mpz_class OP1, type OP2) - Function: int cmp (type OP1, mpz_class OP2)
However, they do not seem to be defined, neither in gmpxx.h nor anywhere else. What am I missing? All the best
Roberto

Roberto Bagnara bagnara@cs.unipr.it writes:
The documentation of GMP 4.0.1 mentions the availability of several cmp() functions, such as
- Function: int cmp (mpz_class OP1, type OP2)
- Function: int cmp (type OP1, mpz_class OP2)
However, they do not seem to be defined, neither in gmpxx.h nor anywhere else.
Hmm. I think you're right.
What am I missing?
Nothing I can see, or nothing but those functions. :-)
I wrote that doco, I guess I got ahead of the actual implementation. Gerardo?

On 2002.01.30 00:02 Kevin Ryde wrote:
Roberto Bagnara bagnara@cs.unipr.it writes:
The documentation of GMP 4.0.1 mentions the availability of several cmp() functions, such as
- Function: int cmp (mpz_class OP1, type OP2)
- Function: int cmp (type OP1, mpz_class OP2)
However, they do not seem to be defined, neither in gmpxx.h nor anywhere else.
Hmm. I think you're right.
What am I missing?
Nothing I can see, or nothing but those functions. :-)
I wrote that doco, I guess I got ahead of the actual implementation. Gerardo?
The functions are there, but their name is "compare" not "cmp". If you think "cmp" is more consistent, there's a line in gmpxx.h saying
__GMP_DEFINE_BINARY_TYPE_FUNCTION(int, compare, __gmp_cmp_function)
just change that.
Gerardo

gerardo.ballabio@unimib.it writes:
The functions are there, but their name is "compare" not "cmp". If you think "cmp" is more consistent, there's a line in gmpxx.h saying
__GMP_DEFINE_BINARY_TYPE_FUNCTION(int, compare, __gmp_cmp_function)
just change that.
Yes, let's go with "cmp".
participants (3)
-
gerardo.ballabioļ¼ unimib.it
-
Kevin Ryde
-
Roberto Bagnara