lcg_tos.Rd
Generates `n` pseudo-random values using the TempleOS constants, with an initial seed taken from the CPU timestamp counter. This code is inspired from the Linear Congruential Generator Specified in the TempleOS source code. To see the source code in TempleOS, see here.
lcg_tos(n = 1L)
A NumericVector of length `n`. Each value is the 64-bit state coerced to double.
lcg_tos
differs from lcg
as the parameters are preconfigured and the random seed comes from the CPU timestamp. It is possible to configure lcg_tos
with lcg
, however this is ready to use preconfigured function that only requires the user to specify the number of random numbers they wish to generate.
random_numbers <- lcg_tos(10000)
# Plot numbers to see that they are random
plot(random_numbers)