mpq_cmp actual return values?
Torbjorn Granlund
tege at swox.com
Mon Mar 13 09:25:43 CET 2006
"didier deshommes" <dfdeshom at gmail.com> writes:
According to the GMP docs, mpq_cmp():
"Compare op1 and op2. Return a positive value if op1 > op2, zero if op1 =
op2, and a
negative value if op1 < op2.
"
Does anyone know about what this return value actually is? On my machine
(pentium M),
* op1 > op2 always returns 1
* op1 == op2 always returns 0
* op1 < op2 always returns -1
Is this conventional or architecture-dependent?
I cannot tell you the actual values, since they are secret.
But one thing is sure, the value will vary with GMP release.
When I test the sevelopmnt code, I get +4711 for 0, and -17,
respectively.
--
Torbjörn
More information about the gmp-discuss
mailing list