Learn R Programming

gmp (version 0.3-1)

Random: Generate a random number

Description

Generate a uniformly distributed random number in the range 0 to $2^size -1$, inclusive.

If seed is precise, a new seed is initialised.

Usage

urand.bigz(nb=1,size=200, seed = 0)

Arguments

nb
Integer: number of random numbers to be generated
size
Integer: size of numbers
seed
Bigz: random seed initialisation

Value

  • A number.

References

mpz_urandomb from Gnu MP Library see http://swox.com/gmp

Examples

Run this code
# Integers are differents
urand.bigz()
urand.bigz()
urand.bigz()

# Integers are the same
urand.bigz(seed="234234234324323")
urand.bigz(seed="234234234324323")

# Vector
urand.bigz(nb=50,size=30)

Run the code above in your browser using DataLab