The OpenD Programming Language

mir.random.engine.xoshiro

$(TR $(TDNW $(LREF Xoshiro256StarStar)) $(TD <tt class="inline-code">xoshiro256**</tt>: all-purpose, rock-solid generator)) $(TR $(TDNW $(LREF Xoshiro128StarStar_32)) $(TD <tt class="inline-code">xoshiro128**</tt> (32-bit): 32-bit-oriented parameterization of <tt class="inline-code">xoshiro**</tt>)) $(TR $(TDNW $(LREF Xoroshiro128Plus)) $(TD <a href="http://en.wikipedia.org/wiki/Xoroshiro128%2B">xoroshiro128+</a>: fast, small, and high-quality))

Generators

Generator nameDescription

$(TR $(TDNW $(LREF XoshiroEngine)) $(TD <tt class="inline-code">xoshiro**</tt> generator.))

Generic Templates

Template nameDescription

Members

Aliases

Xoshiro128StarStar_32
alias Xoshiro128StarStar_32 = XoshiroEngine!(uint, 128, "**", 9, 11, 0, 7, 5, 9)

32-bit-oriented xoshiro** with 128 bits of state. In general Xoshiro256StarStar is preferable except if you are tight on space <em>and</em> know that the generator's output will be consumed 32 bits at a time. (If you need a generator with 128 bits of state that is geared towards producing 64 bits at a time, Xoroshiro128Plus is an option.) 32 bit output. 128 bits of state. Period of 2^^128-1. 4-dimensionally equidistributed. None of its bits fail binary rank tests and it passes tests for Hamming-weight dependencies introduced in the xoshiro paper. From the authors:

Xoshiro256StarStar
alias Xoshiro256StarStar = XoshiroEngine!(ulong, 256, "**", 17, 45, 1, 7, 5, 9)

xoshiro256** (XOR/shift/rotate) as described in Scrambled linear pseudorandom number generators (Blackman and Vigna, 2018). 64 bit output. 256 bits of state. Period of 2^^256-1. 4-dimensionally equidistributed. It is 15% slower than xoroshiro128+ but none of its bits fail binary rank tests and it passes tests for Hamming-weight dependencies introduced in the linked paper. From the authors:

Structs

Xoroshiro128Plus
struct Xoroshiro128Plus

xoroshiro128+ (XOR/rotate/shift/rotate) generator. 64 bit output. 128 bits of state. Period of (2 ^^ 128) - 1.

XoshiroEngine
struct XoshiroEngine(UIntType, uint nbits, string scrambler, uint A, uint B, uint I, uint R, UIntType S, UIntType T)

Template for the xoshiro family of generators. See the paper introducing xoshiro and xoroshiro.

Meta

Authors

Masahiro Nakagawa, Ilya Yaroshenko (rework), Nathan Sashihara