package randii
Install
Dune Dependency
Authors
Maintainers
Sources
md5=1f8f3a98495497cece0131f11c0297e7
sha512=4377b604e5debe94ba98e980ffdbb92e936306460b7db65eee2d1d5493f0abc12f54982527d49351b8461e3208ac158aed79a932575872956e849a432d058e85
README.md.html
randii
OCaml port of Random123 - a counter based random number generator.
This library is a pure OCaml port of the Random123 Threefry algorithms as described in Parallel Random Numbers: As Easy as 1, 2, 3, Salmon, Moraes, Dror & Shaw, SC11, Seattle, Washington, USA, 2011, ACM and originally implemented here.
In terms of number representations this library depends only on ocaml-integers with an additional dependency on zarith if one wants to run the test suite.
Testing
There is a simple CLI tool for basic testing, please see
$ randii --help
for more information.
The test suite uses Known Answer Tests from the test suite of the original implementation - specifically the Threefry
data in kat_vectors
and old_kat_vectors
.
There is also an executable for running the Threefry implementations through the SmallCrush battery of tests via OCaml testu01:
$ dune exec -- u01/smallcrush.exe
WARNING it takes a while to run.
TODOs
basic arithmetic for ctr_t type,
make dependence on testu01 a with-test dep