rfc:rng_fixes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:rng_fixes [2016/07/07 10:32] – Add votes leighrfc:rng_fixes [2016/07/07 13:49] leigh
Line 34: Line 34:
 As <php>mt_rand()</php> can be seeded for repeatable sequences the current implementation makes it incompatible with other systems that do use correct implementations. However fixing it also means that the sequence generated for a given seed in PHP will also now be different. As <php>mt_rand()</php> can be seeded for repeatable sequences the current implementation makes it incompatible with other systems that do use correct implementations. However fixing it also means that the sequence generated for a given seed in PHP will also now be different.
  
-The legacy implementation will be preserved and be selectable with a new `mt_rand_mode(int $mode)` function, along with new constants representing the two modes.+The legacy implementation will be preserved and be selectable with a new `mt_srand(int $seed [, int $mode])` parameter, along with new constants representing the two modes. The default will be the fixed algorithm.
  
 <doodle title="Fix mt_rand() implementation" auth="leigh" voteType="single" closed="false"> <doodle title="Fix mt_rand() implementation" auth="leigh" voteType="single" closed="false">
rfc/rng_fixes.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1