Patches

Pull Requests

History

More information.
I found the following code:
http://mail.gnu.org/archive/html/bug-gmp/2001-05/msg00061.html
Which I then compiled w/ the gmp lib I have installed. Using that little C program that calls the gmp lib directly, the Diophantine equation mentioned in the bug submission gives the correct results:
% ./a.out
1027
712
a = 1027
b = 712
d = 1
s = -165
t = 238
d =? 1
Which is the correct solution.
And using a = 12 and b = 21:
% ./a.out
12
21
a = 12
b = 21
d = 3
s = 2
t = -1
d =? 3
Bottomline: The GMP lib seems to be behaving OK, so maybe somewhere along the passing of the values from PHP to the lib the values are being corrupted?
In view of this I had not sent a bug report to the GMP lib maintainers.

This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
PHP layer was passing arg 1 twice.
So in your example with a=1027 and b=712 What was reaching the gmp library was a=1027 and b=1027
so the solution:
1027*1 + 1027*0 = 1027 was true (in so far as the library was concerned)