<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hiratara</author_name>
  <author_url>https://blog.hatena.ne.jp/hiratara/</author_url>
  <blog_title>Pixel Pedals of Tomakomai</blog_title>
  <blog_url>https://hiratara.hatenadiary.jp/</blog_url>
  <categories>
    <anon>技術</anon>
  </categories>
  <description>数値が小数第四位まで与えられるとする。例えば、 1234.5678 のような形式である。 それらの数値を使って計算をしたいのだが、何も考えないと計算機上ではこれらの数値は double 型などで保持され、誤差が発生することは有名だろう。 &gt;&gt;&gt; 1001.0000 * 1.1000 == 1101.1000 False &gt;&gt;&gt; 1001.0000 * 1.1000 1101.1000000000001 誤差が発生するのは嫌なので、入力を 10000 倍して整数として扱いたくなる。例えば、 1234.5678 は 12345678 に変換したい。 しかし、この操作にも注意が必要である。 http…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhiratara.hatenadiary.jp%2Fentry%2F2022%2F02%2F05%2F164209&quot; title=&quot;小数第四位までの小数を10000倍して整数に直せるのか - Pixel Pedals of Tomakomai&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>2022-02-05 16:42:09</published>
  <title>小数第四位までの小数を10000倍して整数に直せるのか</title>
  <type>rich</type>
  <url>https://hiratara.hatenadiary.jp/entry/2022/02/05/164209</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
