The package is a Julia interface to the test suite TestU01 of Pierre l'Ecuyer. All the tests included in the SmallCrush and BigCrush test batteries can be called as Julia functions. The first argument to the test function must be either
-
a function without arguments, which must return a
Float64between zero and one, or -
a wrapped
AbstractRNGobtained via the functionwrap(rng, T)whereTis the type of the variates produced byrngthat one wants tested (currentlyTmust be one of the standard finite-precision JuliaIntegerorFloatingPointtypes).
The output from the test is a p-value. The package also includes the Small- and the BigCrush batteries. Some examples:
julia> using RNGTest
julia> RNGTest.smallcrushJulia(rand)
julia> using Distribtions
julia> gf() = cdf(Gamma(), rand(Gamma()));
julia> RNGTest.bigcrushJulia(gf)
julia> rng = RNGTest.wrap(MersenneTwister(), UInt32)
julia> RNGTest.bigcrushTestU01(rng)Note that the BigCrush test battery takes about twelve hours on a normal computer.