Random number generator (included): Difference between revisions

+Icon+Unicon
(omit from Unlambda)
(+Icon+Unicon)
Line 66:
=={{header|Haskell}}==
The [http://www.haskell.org/onlinereport/random.html Haskell 98 report] specifies an interface for pseudorandom number generation and requires that implementations be minimally statistically robust. It is silent, however, on the choice of algorithm.
 
=={{header|Icon}} and {{header|Unicon}} ==
Icon and Unicon both use the same linear congruential random number generator x := (x * 1103515245 + 453816694) mod 2^31. This LCRNG repeats with a cycle length of 1073741824.
Icon uses an initial seed value of 0 and Unicon randomizes the initial seed.
The {{libheader|Icon Programming Library}} [http://www.cs.arizona.edu/icon/library/src/procs/random.icn random] provides additional related procedures including a parametrized LCRNG that defaults to the built-in values.
 
=={{header|J}}==
Anonymous user