Random number generator (included): Difference between revisions
Content deleted Content added
→{{header|PL/I}}: correct lang tag usage |
R random numbers |
||
Line 64: | Line 64: | ||
=={{header|Ruby}}== |
=={{header|Ruby}}== |
||
Ruby's <code>rand</code> function currently uses the [[wp:Mersenne twister|Mersenne twister]] algorithm, as described in [http://www.ruby-doc.org/core/classes/Kernel.html#M005974 its documentation]. |
Ruby's <code>rand</code> function currently uses the [[wp:Mersenne twister|Mersenne twister]] algorithm, as described in [http://www.ruby-doc.org/core/classes/Kernel.html#M005974 its documentation]. |
||
=={{header|R}}== |
|||
For uniform random numbers, R may use Wichmann-Hill, Marsaglia-multicarry, Super-Duper, Mersenne-Twister, or Knuth-TAOCP |
|||
(both 1997 and 2002 versions), or a user-defined method. The default is Mersenne Twister. |
|||
R is able to generate random numbers from a variety of distributions, e.g. |
|||
# Beta |
|||
# Binomial |
|||
# Cauchy |
|||
# Chi-Squared |
|||
# Exponential |
|||
# F |
|||
# Gamma |
|||
# Geometric |
|||
# Hypergeometric |
|||
# Logistic |
|||
# Log Normal |
|||
# Multinomial |
|||
# Negative Binomial |
|||
# Normal |
|||
# Poisson |
|||
# Student t |
|||
# Uniform |
|||
# Weibull |
|||
See R help on [http://pbil.univ-lyon1.fr/library/base/html/Random.html Random number generation], or in the R system type |
|||
<lang R> |
|||
?RNG |
|||
help.search("Distribution", package="stats") |
|||
</lang> |
|||
=={{header|Ursala}}== |
=={{header|Ursala}}== |