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.
There is a simple CLI tool for basic testing, please see
$ randii --helpfor 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.exeWARNING it takes a while to run.