<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>abo_junghichi</author_name>
  <author_url>https://blog.hatena.ne.jp/abo_junghichi/</author_url>
  <blog_title>一人一党党</blog_title>
  <blog_url>https://abo-junghichi.hatenablog.jp/</blog_url>
  <categories>
    <anon>プログラミング</anon>
    <anon>#政党、団体</anon>
  </categories>
  <description>とってもお手軽な割にそこそこ高速で高品質な疑似乱数生成アルゴリズム「xorshift」。 32bit版などの実装では、乱数生成一回あたりxor演算とshift演算を3組、計6回演算命令を使わねばならない。 ところが64bit版実装では、xorとshiftの組を2組しか使わずとも、2の64乗の周期が出る。 そこで、31bit版などbit数がメルセンヌ素数の場合、2組で可能か試してみた。 一般的なCPUのレジスタは32bitや64bitなど2のベキ乗なので、bit数を調整するためにand演算でbitmaskをかける必要がある。 しかしand演算はxorやshfit同様に軽い整数演算だ。 従って、x…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fabo-junghichi.hatenablog.jp%2Fentry%2F66477435&quot; title=&quot;メルセンヌ素数でxorshift疑似乱数の軽量化 - 一人一党党&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-03-27 04:03:27</published>
  <title>メルセンヌ素数でxorshift疑似乱数の軽量化</title>
  <type>rich</type>
  <url>https://abo-junghichi.hatenablog.jp/entry/66477435</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
