Req #32145 [Opn->Csd]: Mersenne Twister seed option required

From: Date: Fri, 08 Apr 2022 08:22:22 +0000
Subject: Req #32145 [Opn->Csd]: Mersenne Twister seed option required
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240805@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=32145&edit=1 ID: 32145 Updated by: ilutov@php.net Reported by: hardeman at nmni dot net Summary: Mersenne Twister seed option required -Status: Open +Status: Closed Type: Feature/Change Request Package: Math related Operating System: All OS PHP Version: All versions -Assigned To: +Assigned To: ilutov Block user comment: N Private report: N New Comment: There are ongoing discussions about a random extensions. The last (failed) RFC attempt is here. https://wiki.php.net/rfc/rng_extension Thus, I'm closing this issue. Previous Comments: ------------------------------------------------------------------------ [2005-03-04 15:33:42] hardeman at nmni dot net As a temporary solution, I have now created a PHP class which implements the Mersenne Twister PRNG with the updated initialization methods. I can make this class available to other PHP users - just send me a mail. Hendrik Hardeman ------------------------------------------------------------------------ [2005-03-01 10:25:13] hardeman at nmni dot net Description: ------------ Unless the PHP documentation is not up-to-date, the only seed option for the Mersenne Twister RNG is a 32-bit integer. The original (updated) MT implementation (see http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html), however, allows for seed arrays of arbitrary length to better exploit the large period of the RNG. It would be nice if this option were built in in future versions of PHP so that I myself and probably quite a few other PHP users won't have to implement the RNG in PHP code itself or create a private extension in C++. Adding this feature to PHP should not require a lot of effort as other implementations are readily available. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=32145&edit=1

« previous php.bugs (#240805) next »