rMWC: Multiply-With-Carry Random Number Generator

View source: R/rMWC.R

rMWCR Documentation

Multiply-With-Carry Random Number Generator

Description

Basic implementation of the multiply-with-carry generator.

Usage

rMWC(n, par) 

Arguments

n

numeric: number of variates to generate.

par

an integer vector containing parameters for the generator: X, C, A, B.

Value

a vector of n uniform random numbers

References

Marsaglia, G. (2003) Random Number Generators. Journal of Modern Applied Statistical Methods. 2(1):2.

Examples

x <- rMWC(58, c(5, 3, 6, 10))
summary(x)

MiscMath documentation built on April 13, 2025, 9:07 a.m.