{"version":"1.0","author_url":"https://blog.hatena.ne.jp/ymtsh/","categories":[],"type":"rich","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","blog_url":"https://ymtsh.hatenablog.com/","published":"2025-10-18 03:05:16","blog_title":"\u7707\u7707\u6cdb\u6cdb","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/y/ymtsh/20251018/20251018032401.png","height":"190","title":"MSVC\u306estd::pow\u306e\u6319\u52d5\u304c\u3061\u3087\u3063\u3068\u6c17\u6301\u3061\u60aa\u304f\u306a\u3063\u3066\u3044\u308b\u8a71","url":"https://ymtsh.hatenablog.com/entry/2025/10/18/030516","author_name":"ymtsh","description":"2025/10/18\u65e5\u3067\u306e\u3001MSVC STL cmath\u306epow\u306e\u8a71\u3002 2\u4e57\uff08\u6574\u6570\u6307\u6570\u6642\uff09\u306epow\u95a2\u6570\u306fx*x\u3092\u8fd4\u3059\u3088\u3046\u306b\u306a\u3063\u305f\uff08\u623b\u3057\u305f\uff09\u3089\u3057\u3044\u3002 \u8a73\u3057\u304f\u306f\u3053\u3053\u3092\u53c2\u8003\u3002 \u7c21\u5358\u306b\u306fstd::pow\u304c\u547c\u3073\u51fa\u3057\u3066\u3044\u305fUCRT\u306epow\u306e\u305b\u3044\u3089\u3057\u3044\u3002 It turns out that the UCRT mishandles squaring in a small fraction of cases, returning answers that are off by 1 ULP (unit in the last place). \u4e0b\u8a18\u306fMSVC STL\u306e\u5b9f\u88c5\u3002 // https://github.co\u2026","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fymtsh.hatenablog.com%2Fentry%2F2025%2F10%2F18%2F030516\" title=\"MSVC\u306estd::pow\u306e\u6319\u52d5\u304c\u3061\u3087\u3063\u3068\u6c17\u6301\u3061\u60aa\u304f\u306a\u3063\u3066\u3044\u308b\u8a71 - \u7707\u7707\u6cdb\u6cdb\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}