{"image_url":null,"published":"2012-10-02 16:53:29","title":"Python3.3\u306edecimal\u304c\u99ac\u9e7f\u3063\u3071\u3084\u3044\u4ef6","height":"190","description":"Python 3.3 \u3067\u306f decimal\u30e2\u30b8\u30e5\u30fc\u30eb\u304cC\u8a00\u8a9e\u3067\u5b9f\u88c5\u3055\u308c\u300110\u9032\u6d6e\u52d5\u5c11\u6570\u6f14\u7b97\u304c\u99ac\u9e7f\u3063\u3071\u3084\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u5358\u7d14\u306a\u30cb\u30e5\u30fc\u30c8\u30f3\u6cd5\u3067\u5e73\u65b9\u6839\u3092\u8a08\u7b97\u3057\u3066\u307f\u308b\u3068\u3001 def newton(n): guess = n/2 better = (guess + n/guess)/2 while better != guess: guess = better better = (guess + n/guess)/2 return guess Python2.7\u3067\u306f \u6d6e\u52d5\u5c11\u6570\u70b9 $ python -m timeit \"import decimal;import newton;newton.newton(2.\u2026","type":"rich","provider_url":"https://hatena.blog","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fatsuoishimoto.hatenablog.com%2Fentry%2F20121002%2F1349164409\" title=\"Python3.3\u306edecimal\u304c\u99ac\u9e7f\u3063\u3071\u3084\u3044\u4ef6 - atsuoishimoto&#39;s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","author_name":"atsuoishimoto","blog_url":"https://atsuoishimoto.hatenablog.com/","blog_title":"atsuoishimoto's diary","categories":["python"],"version":"1.0","url":"https://atsuoishimoto.hatenablog.com/entry/20121002/1349164409","author_url":"https://blog.hatena.ne.jp/atsuoishimoto/"}