Re: com php-src: Revert "Fix #71152: mt_rand() returns thedifferent values from original mt19937ar.c": ext/standard/rand.c
ext/standard/tests/math/mt_rand_value.phpt
| From: | Andrea Faulds | Date: | Sat, 20 Feb 2016 01:39:32 +0000 |
| Subject: | Re: com php-src: Revert "Fix #71152: mt_rand() returns thedifferent values from original mt19937ar.c": ext/standard/rand.c ext/standard/tests/math/mt_rand_value.phpt |
||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91336@lists.php.net to get a copy of this message | ||
Hi Yasuo,
Yasuo Ohgaki wrote:
This should be discussed in internals. MT rand being not MT rand is unacceptable. This fix must included in released versions. IMHO. In any case we should provide broken MT rand, we must use INI switch or other options.PHP's implementation of the Mersenne Twister algorithm is buggy, so it doesn't produce the same output as in other languages. But the buggy algorithm produces sufficiently random sequences of apparently the same quality as the proper algorithm. So we *could* simply consider this as a documentation issue if we wanted to. I'm not saying that's the right course of action, though. Thanks. -- Andrea Faulds https://ajf.me/