Deal cards for FreeCell: Difference between revisions

Content added Content deleted
(added FreeBASIC)
(Restoring visibility of task description formulae (lost in under-tested cosmetic edits at 21:04, 15 May 2016))
Line 10: Line 10:
The algorithm uses this [[linear congruential generator]] from Microsoft C:
The algorithm uses this [[linear congruential generator]] from Microsoft C:


* <math> state_{n + 1} \equiv 214013 \times state_n + 2531011 \pmod{2^{31}} </math>
* <math>state_{n + 1} \equiv 214013 \times state_n + 2531011 \pmod{2^{31}}</math>
* <math> rand_n = state_n \div 2^{16} </math>
* <math>rand_n = state_n \div 2^{16}</math>
* <math> rand_n </math> is in range 0 to 32767.
* <math>rand_n</math> is in range 0 to 32767.
* Rosetta Code has another task, [[linear congruential generator]], with code for this RNG in several languages.
* Rosetta Code has another task, [[linear congruential generator]], with code for this RNG in several languages.