<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hnw</author_name>
  <author_url>https://blog.hatena.ne.jp/hnw/</author_url>
  <blog_title>hnwの日記</blog_title>
  <blog_url>https://hnw.hatenablog.com/</blog_url>
  <categories>
    <anon>浮動小数点数</anon>
    <anon>PHP</anon>
  </categories>
  <description>(2012/11/01追記) 4年ほど前の記事「PHP5.3.0alpha3のround関数の実装がPHP5.2.6と変わった - hnwの日記」でお伝えした通り、PHP 5.3.0から別の実装が採用されており、本ページで指摘しているような挙動のPHPは既に絶滅危惧種です。念のため。 さて、プログラミングの話題もたまには書いてみます。今回はPHPのround関数の挙動が変だ！という話題です。 round()は浮動小数点数を四捨五入する関数で、大抵の言語に同じ名前で実装されているかと思います。ではPHPのround関数の何が問題なのか、ちょっと試してみましょう。 $ uname -sro Lin…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhnw.hatenablog.com%2Fentry%2F20070515&quot; title=&quot;PHPの奇妙なround関数 - hnwの日記&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>2007-05-15 00:00:00</published>
  <title>PHPの奇妙なround関数</title>
  <type>rich</type>
  <url>https://hnw.hatenablog.com/entry/20070515</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
