Bug #71152 [Csd->ReO]: mt_rand() returns the different values from original mt19937ar.c
| From: | ab@php.net | Date: | Thu, 18 Feb 2016 18:21:27 +0000 |
| Subject: | Bug #71152 [Csd->ReO]: mt_rand() returns the different values from original mt19937ar.c | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199325@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71152&edit=1
ID: 71152
Updated by: ab@php.net
Reported by: kusano4a at gmail dot com
Summary: mt_rand() returns the different values from original
mt19937ar.c
-Status: Closed
+Status: Re-Opened
Type: Bug
Package: *Math Functions
Operating System: All
PHP Version: master-Git-2015-12-17 (Git)
Block user comment: N
Private report: N
New Comment:
Reopen as the patch is reverted.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2016-02-18 11:26:02] leigh@php.net
Automatic comment on behalf of leigh
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a0724d30817600540946b41e40f4cfc2a0c30f80
Log: Revert "Fix #71152: mt_rand() returns the different values from original
mt19937ar.c"
------------------------------------------------------------------------
[2016-02-18 11:13:12] leigh@php.net
Automatic comment on behalf of leigh
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a0724d30817600540946b41e40f4cfc2a0c30f80
Log: Revert "Fix #71152: mt_rand() returns the different values from original
mt19937ar.c"
------------------------------------------------------------------------
[2016-02-17 03:35:26] laruence@php.net
Automatic comment on behalf of kusano@users.noreply.github.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d31e8a9a85efea54db0b647424f6c4485d71db8b
Log: Fix #71152: mt_rand() returns the different values from original mt19937ar.c
------------------------------------------------------------------------
[2016-02-17 03:35:23] laruence@php.net
Automatic comment on behalf of kusano@users.noreply.github.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6f6bd8ce531636134efd5f669a4e8373fb2e9e51
Log: Fix #71152: mt_rand() returns the different values from original mt19937ar.c
------------------------------------------------------------------------
[2015-12-17 19:13:25] kusano4a at gmail dot com
Description:
------------
mt_rand() returns the different values from original mt19937ar.c.
Although mt_rand() is required to be generate random numbers, I am concerned about that this
difference implies possibly deterioration of randomness quality.
Test script:
---------------
<?php
mt_srand(12345678);
for ($i=0; $i<10; $i++)
echo mt_rand().PHP_EOL;
Expected result:
----------------
527860569
1711027313
1280820687
688176834
770499160
412773096
813703253
898651287
52508912
757323740
Actual result:
--------------
1614640687
1711027313
857485497
688176834
1386682158
412773096
813703253
898651287
2087374214
1382556330
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71152&edit=1