Edit report at https://bugs.php.net/bug.php?id=62068&edit=1

 ID:                 62068
 Updated by:         a...@php.net
 Reported by:        mattfic...@php.net
 Summary:            Test bug - gmp_nextprime and 022
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            GNU MP related
 Operating System:   Windows
 PHP Version:        5.4.4RC1
-Assigned To:        
+Assigned To:        ab
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2012-05-21 10:39:52] a...@php.net

Automatic comment on behalf of mattficken
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=645d65f3e30788c0f7d88e753d90234867622a01
Log: Fixed bug #62068 Test bug - gmp_nextprime and 022

------------------------------------------------------------------------
[2012-05-18 21:37:21] mattfic...@php.net

Description:
------------
On Windows, the gmp extension uses MPIR 1.3.1, forked from GMP 4.2.1.

The unexpected values are returned by gmp_nextprime() and gmp_gcdext().

Both the values are produced by the corresponding MPIR functions. The problem 
is 
not in the gmp extension.

These are behavior differences between MPIR and GMP. The next prime number 
(gmp_nextprime) from -1000 is expected to be 2, but could be -997 depending on 
the definition of prime numbers (can primes be negative?).

A newer version of MPIR may fix this problem, however we can't upgrade to it 
due 
to license issues. 

This may get worked out eventually. For now, we've decided to fork the affected 
tests into Windows/MPIR specific tests.

The attached patch fixes this issue.



Actual result:
--------------
003+ string(4) "-997"
003- string(1) "-2"


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62068&edit=1

Reply via email to