<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>a7333027</author_name>
  <author_url>https://blog.hatena.ne.jp/a7333027/</author_url>
  <blog_title>hibivi 日々マナビ</blog_title>
  <blog_url>https://a7333027.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>結論 BCMath関数を使う http://php.net/manual/ja/ref.bc.php たまたま12ｹﾀくらいの数値を扱っていて、 剰余算が-1とか-2、割り切れないくせに0を吐き出すことがあった。 &lt;?php // 適当に多い桁の数値を3で割ったときのあまりを求める。 $no = 600000000111; echo $no % 3 .&quot;\n&quot;; // 実行すると -2 $no = 600851475143; echo $no % 3 .&quot;\n&quot;; // 割り切れないのに 0を返す ?&gt; 最初は自分の剰余算の認識がおかしいのかと思ってしまった。 まぁ普通に考えて・・・ケタあふれ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fa7333027.hatenadiary.org%2Fentry%2F20121224&quot; title=&quot;PHPで扱える整数最大値を超えた場合の計算法 - hibivi 日々マナビ&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>2012-12-24 00:00:00</published>
  <title>PHPで扱える整数最大値を超えた場合の計算法</title>
  <type>rich</type>
  <url>https://a7333027.hatenadiary.org/entry/20121224</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
