Define XorshiftStarEngine with well-chosen parameters for large simulations on 64-bit machines.
Define XorshiftEngine generators with well-chosen parameters for 32-bit architectures. Xorshift is an alias of one of the generators in this module.
Generates 32 bits of output from 64 bits of state. A fast generator with excellent statistical properties for memory-constrained situations where more than 64 bits of state would be too much and generating only 32 bits with each opCall will not cause a slowdown. If you need a generator with 64 bits of state that produces output 64 bits at a time SplitMix64 is an option.
Xorshift generator. Implemented according to Xorshift RNGs (Marsaglia, 2003) with Sebastino Vigna's optimization for large arrays.
Template for the xorshift* family of generators (Vigna, 2016; draft 2014).
Template for the xorshift* family of generators (Vigna, 2016; draft 2014).
Copyright Andrei Alexandrescu 2008 - 2009, Masahiro Nakagawa, Ilya Yaroshenko 2016-.
Generators
$(TR $(TDNW $(LREF Xorshift1024StarPhi)) $(TD <tt class="inline-code">xorshift1024*φ</tt>: when something larger than <tt class="inline-code">xoroshiro128+</tt> is needed)) $(TR $(TDNW $(LREF Xorshift64Star32)) $(TD <tt class="inline-code">xorshift64*/32</tt>: internal state of 64 bits and output of 32 bits))
$(TR $(TDNW $(LREF Xorshift192)) $(TD Generator from Marsaglia's paper combining 160-bit xorshift with a counter)) $(TR $(TDNW $(LREF Xorshift)) $(TD An alias to one of the generators in this package))
Generic Templates
$(TR $(TDNW $(LREF XorshiftStarEngine)) $(TD <tt class="inline-code">xorshift*</tt> generator with any word size and any number of bits of state.)) $(TR $(TDNW $(LREF XorshiftEngine)) $(TD <tt class="inline-code">xorshift</tt> generator with any word size and any number of bits of state.))