https://github.com/juliarandom/rngtest.jl
Code for testing of Julia's random numbers
https://github.com/juliarandom/rngtest.jl
Last synced: 6 months ago
JSON representation
Code for testing of Julia's random numbers
- Host: GitHub
- URL: https://github.com/juliarandom/rngtest.jl
- Owner: JuliaRandom
- License: mit
- Created: 2012-10-14T16:46:51.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2025-01-30T19:36:28.000Z (over 1 year ago)
- Last Synced: 2025-03-11T00:12:19.402Z (over 1 year ago)
- Language: Julia
- Size: 6.05 MB
- Stars: 12
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# The Crush test suite of l'Ecuyer for Julia
[](https://github.com/JuliaRandom/RNGTest.jl/actions/workflows/CI.yml)
[](https://codecov.io/gh/JuliaRandom/RNGTest.jl)
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 `Float64` between zero and one, or
* a wrapped `AbstractRNG` obtained via the function `wrap(rng, T)`
where `T` is the type of the variates produced by `rng` that one
wants tested (currently `T` must be one of the standard
finite-precision Julia `Integer` or `FloatingPoint` types).
The output from the test is a p-value.
The package also includes the Small- and the BigCrush batteries. Some examples:
```julia
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.
## Homepage of the test suite
http://simul.iro.umontreal.ca/testu01/tu01.html