<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kazu-yamamoto</author_name>
  <author_url>https://blog.hatena.ne.jp/kazu-yamamoto/</author_url>
  <blog_title>あどけない話</blog_title>
  <blog_url>https://kazu-yamamoto.hatenablog.jp/</blog_url>
  <categories>
    <anon>数学</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>昔、あるプログラムのソースを読んでいて、ハッシュの大きさとして 128 が使われていました。「2 の累乗を使うとは何事か！」と思い、二度とその人の書いたコードは読まなくなりました。2 の累乗で割って余りを取ると、ほとんど計算しないことは明らかですね。上のビットをマスクして、全部 0 にしているだけですから。たとえば、0x01020304 を 256 で割った余りは 0x04 です。一方、「2 の累乗 - 1」で割って余りを取る計算も、実はほとんど計算になってないのを知っている人は、あまりいないでしょう。たとえば、0x01020304 を 255 で割った余りは、0x0a とすぐ計算できない人が…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkazu-yamamoto.hatenablog.jp%2Fentry%2F20080121%2F1200924208&quot; title=&quot;余り - あどけない話&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>2008-01-21 23:03:28</published>
  <title>余り</title>
  <type>rich</type>
  <url>https://kazu-yamamoto.hatenablog.jp/entry/20080121/1200924208</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
