<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nishiohirokazu</author_name>
  <author_url>https://blog.hatena.ne.jp/nishiohirokazu/</author_url>
  <blog_title>西尾泰和のはてなダイアリー</blog_title>
  <blog_url>https://nishiohirokazu.hatenadiary.org/</blog_url>
  <categories>
    <anon>c</anon>
  </categories>
  <description>浮動小数点数を正確に表示するにはどうしたらいいんだろう。3番目のprintfで1と表示されるのが困る。値としては1ではない値が入っているわけなのだから、なにかそれのわかる出力方法はないのか。このケースに関しては2番目のように%.17lfでそれなりに表示できるけど、それって小数部の頭に0がいくつあるかわからないシチュエーションでは使えないわけで。むー。 #include &lt;stdio.h&gt; #include &lt;math.h&gt; int main(){ double p = 1.0 / 6.0; double sum = 0.0; int i; for(i=0; i&lt;6; i++){ sum += …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnishiohirokazu.hatenadiary.org%2Fentry%2F20080725%2F1216987891&quot; title=&quot;浮動小数点数の表示方法 - 西尾泰和のはてなダイアリー&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>2008-07-25 21:11:31</published>
  <title>浮動小数点数の表示方法</title>
  <type>rich</type>
  <url>https://nishiohirokazu.hatenadiary.org/entry/20080725/1216987891</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
