<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rubyco</author_name>
  <author_url>https://blog.hatena.ne.jp/rubyco/</author_url>
  <blog_title>rubyco（るびこ）の日記</blog_title>
  <blog_url>https://rubyco.hatenadiary.org/</blog_url>
  <categories>
    <anon>am</anon>
  </categories>
  <description>線形合同法による疑似乱数生成器をRubyで書きました。 class LinearCongruentialRandom A = 1812433253 def initialize(seed=314159) @state = seed end def next(max) @state = A * @state + 1 @state % max.to_i.abs end end r = LinearCongruentialRandom.new 100.times do print &quot;#{r.next(10000)}, &quot; end実行結果です。 9228, 8685, 2306, 1419, 6008…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubyco.hatenadiary.org%2Fentry%2F20060310%2Frand&quot; title=&quot;線形合同法 - rubyco（るびこ）の日記&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>2006-03-10 00:00:05</published>
  <title>線形合同法</title>
  <type>rich</type>
  <url>https://rubyco.hatenadiary.org/entry/20060310/rand</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
