Re: mt_srand with array seed?
| From: | Tom Worster | Date: | Fri, 12 Aug 2016 18:40:44 +0000 |
| Subject: | Re: mt_srand with array seed? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-95101@lists.php.net to get a copy of this message | ||
On 8/11/16 10:13 AM, Lauri Kenttä wrote:
Hello, Any thoughts about supporting a longer seed array for mt_srand? Does anyone really need it? Should it be in mt_srand or mt_srand_array? See: https://bugs.php.net/bug.php?id=32145The second question is controversial. People have asserted that nobody does statistical work in PHP, or that if they do it's not a "legitimate" use of PHP. There were demands for evidence that anyone has ever legitimately needed to seed an RNG in PHP. I disagree. #32145 in itself is sufficient for me. For statistical work 2^32 starting positions is not enough. MT's period is Vast, like Dennett's Vast with a capital V. Nobody needs *that* much but if MT is what we've got then it seems reasonable to allow access to more of it. mt_srand() will work. But what would be in the array? Integers from which the upper 32 bits, if they exist, are discarded? Tom