CakeFest 2017 NYC, the Official CakePHP Conference

# stats_rand_setall

(PECL stats >= 1.0.0)

stats_rand_setallNot documented

### Description

void stats_rand_setall ( int `\$iseed1` , int `\$iseed2` )
Warning

This function is currently not documented; only its argument list is available.

`iseed1`

`iseed2`

### Return Values

``` tl;dr - This random number generator is implemented using linear congruential generators. The arguments iseed1 and iseed2 each expect a 32-bit integer.I can't believe this PECL package has such terrible documentation that I have to dig into the C source code to figure out how to use it.Documentation from PECL source, lines 246-262 of "com.c" found at:http://git.php.net/?p=pecl/math/stats.git;a=blob;f=com.c;h=7740ac636969e500254c61697125dfa8857dd715;hb=refs/heads/master/***********************************************************************void setall(long iseed1,long iseed2)          SET ALL random number generatorsSets the initial seed of generator 1 to ISEED1 and ISEED2. Theinitial seeds of the other generators are set accordingly, andall generators states are set to these seeds.This is a transcription from Pascal to Fortran of routineSet_Initial_Seed from the paperL'Ecuyer, P. and Cote, S. "Implementing a Random Number Packagewith Splitting Facilities." ACM Transactions on MathematicalSoftware, 17:98-111 (1991)                         Argumentsiseed1 -> First of two integer seedsiseed2 -> Second of two integer seeds***********************************************************************/Looking further into the referenced paper, we see:PROCEDURE Set_lnitiaI_Seed (S1, S2 INTEGER);Resets the initial seed of generator 1 to the values S1 and S2, which must satisfy: 1 <= S1 <= 2147483562 and 1 <= S2 <= 2147483398. The initial seeds of all other generators are recomputed accordingly, and all generatorâ€™s states are reset to these initial seeds. This procedure is called automatically at the beginning of program execution, with (default) parameter values S1 = 1234567890 and S2 = 123456789. ```