<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>zenpou</author_name>
  <author_url>https://blog.hatena.ne.jp/zenpou/</author_url>
  <blog_title>zenpouの日記</blog_title>
  <blog_url>https://zenpou.hatenadiary.org/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>小江戸ラグの活動報告会で、 p 1 / 3 #=&gt; 0 p 1.0 / 3 #=&gt; 0.333333333333333 となっていて、0.33333という結果を得たいが、 計算が複雑で長い為、数字を一つ一つ小数点使って書きたくないって話があって どうすればいいのか？って話がありました。 class Fixnum alias old_division :/ def /(value) old_division value.to_f end end p 1/2 #=&gt; 0.5 こんなふうだとどうだろうか ひどい手抜き</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fzenpou.hatenadiary.org%2Fentry%2F20100612%2F1276330955&quot; title=&quot;整数の割り算で小数点を返す - zenpouの日記&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>2010-06-12 17:22:35</published>
  <title>整数の割り算で小数点を返す</title>
  <type>rich</type>
  <url>https://zenpou.hatenadiary.org/entry/20100612/1276330955</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
