Random number generator (included): Difference between revisions
Content added Content deleted
(Added PicoLisp) |
|||
Line 50: | Line 50: | ||
with a multiplier suggested in Knuth's "Seminumerical Algorithms". See the |
with a multiplier suggested in Knuth's "Seminumerical Algorithms". See the |
||
[http://software-lab.de/doc/refR.html#rand documentation]. |
[http://software-lab.de/doc/refR.html#rand documentation]. |
||
=={{header|PL/I}}== |
|||
<lang PL/I> |
|||
Values produced by IBM Visualage PL/I compiler |
|||
built-in random number generator are uniformly distributed |
|||
between 0 and 1 [0 <= random < 1] |
|||
It uses a multiplicative congruential method: |
|||
seed(x) = mod(950706376 * seed(x-1), 2147483647) |
|||
random(x) = seed(x) / 2147483647 |
|||
</lang> |
|||
=={{header|Python}}== |
=={{header|Python}}== |