タグ

ブックマーク / lucille.atso-net.jp (1)

  • lucille development blog » Blog Archive » Xorshift RNGs

    G. Marsaglia. Xorshift RNGs. Journal of Statistical Software, 8(14) :1 6, 2003 http://www.jstatsoft.org/v08/i14/xorshift.pdf George Marsaglia 氏により 2003 年に考案された、xor とシフトを使うだけの超高速な擬似乱数生成器(Random Number Generator, RNG)です。周期は 2^k-1(k = 32, 64, 96, 128, 160, 192)。ランダム性のテストにも十分合格するとのこと。たとえば、周期が 2^128-1 の場合のルーチンは以下のようになり、乱数値の計算部分はわずか 1 行である。 unsigned long xor128(){ static unsigned long x=123456789,y

  • 1