<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rochefort</author_name>
  <author_url>https://blog.hatena.ne.jp/rochefort/</author_url>
  <blog_title>rochefort's blog</blog_title>
  <blog_url>https://rochefort.hatenablog.com/</blog_url>
  <categories>
    <anon>ruby</anon>
    <anon>gold</anon>
  </categories>
  <description>ruby gold対策。 そういえば試験で、こんなのが出ました。 0.1を10回足した総和は1.0と等しいか？ &gt;&gt; sum=0;10.times.each{ |x| sum+=0.1 } =&gt; 10 &gt;&gt; sum == 1.0 答えはfalse（等しくない）なんですが、 &gt;&gt; sum == 1.0 =&gt; false &gt;&gt; sum =&gt; 0.9999999999999999 これは浮動小数点の計算の話でrubyあんまり関係ないなぁと思いながら解いていました。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frochefort.hatenablog.com%2Fentry%2F2013%2F06%2F06%2F001043&quot; title=&quot;0.1を10回足した総和は1.0と等しいか？ - rochefort&amp;#39;s blog&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>2013-06-06 00:10:43</published>
  <title>0.1を10回足した総和は1.0と等しいか？</title>
  <type>rich</type>
  <url>https://rochefort.hatenablog.com/entry/2013/06/06/001043</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
