{"url":"https://ksmakoto.hatenadiary.com/entry/2016/12/25/171916","categories":[],"blog_url":"https://ksmakoto.hatenadiary.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fksmakoto.hatenadiary.com%2Fentry%2F2016%2F12%2F25%2F171916\" title=\"Ruby 2.4 \u306e\u65b0\u6a5f\u80fd, Array#sum - ksmakoto\u306ehatenadiary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"width":"100%","title":"Ruby 2.4 \u306e\u65b0\u6a5f\u80fd, Array#sum","blog_title":"ksmakoto\u306ehatenadiary","author_name":"metanest","description":"Ruby 2.4 \u3067\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308b\u65b0\u6a5f\u80fd\u306e\u3072\u3068\u3064\u306b Array#sum \u304c\u3042\u308a\u307e\u3059\u3002\uff08\u53c2: \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f http://ruby-doc.org/core-2.4.0/Array.html#method-i-sum \uff09\u5171\u7acb\u300e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u8f9e\u5178\u300f\u3067\u3082\u300c\u7dcf\u548c\u8a08\u7b97\u300d\u3092\u7acb\u9805\u3057\u3066\u3044\u308b\u3088\u3046\u306b\u3001\u60c5\u5831\u843d\u3061*1*2\u306b\u3088\u308b\u300c\u7a4d\u307f\u6b8b\u3057\u300d\u304c\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u8457\u3057\u3044\u306e\u304c\u3001\u5bfe\u8c61\u304c\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u6642\u306e\u7dcf\u548c\u8a08\u7b97\u306e\u554f\u984c\u70b9\u3067\u3059\u3002Array#sum \u306f\u3001Kahan summation algorithm\uff08wikipedia:\u30ab\u30cf\u30f3\u306e\u52a0\u7b97\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3001summation \u306a\u306e\u3067 -\u7dcf\u548c\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0 \u306a\u3044\u3057 -\u7dcf\u548c\u8a08\u7b97\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3001\u3068\u3057\u305f\u307b\u3046\u2026","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/metanest/","type":"rich","provider_name":"Hatena Blog","height":"190","published":"2016-12-25 17:19:16","version":"1.0"}