{"id":18907,"date":"2023-06-05T00:30:19","date_gmt":"2023-06-05T00:30:19","guid":{"rendered":"https:\/\/club.informatix.co.jp\/?p=18907"},"modified":"2024-11-05T06:41:20","modified_gmt":"2024-11-05T06:41:20","slug":"python%e3%81%a7%e6%95%b0%e5%80%a4%e8%a8%88%e7%ae%97%e3%80%80decimal%e3%83%a2%e3%82%b8%e3%83%a5%e3%83%bc%e3%83%ab%e7%b7%a8%ef%bd%9cpython%e3%81%a7%e6%95%b0%e5%ad%a6%e3%82%92%e5%ad%a6%e3%81%bc%e3%81%86","status":"publish","type":"post","link":"https:\/\/club.informatix.co.jp\/?p=18907","title":{"rendered":"Python\u3067\u6570\u5024\u8a08\u7b97\u3000decimal\u30e2\u30b8\u30e5\u30fc\u30eb\u7de8\uff5cPython\u3067\u6570\u5b66\u3092\u5b66\u307c\u3046\uff01 \u7b2c33\u56de"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u76ee\u6b21<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69f5b92b35b20\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69f5b92b35b20\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/club.informatix.co.jp\/?p=18907\/#%E8%A8%88%E7%AE%97%E8%AA%A4%E5%B7%AE%EF%BD%9C%E9%9B%BB%E5%AD%90%E8%A8%88%E7%AE%97%E6%A9%9F%E3%81%AE%E5%AE%BF%E5%91%BD\" >\u8a08\u7b97\u8aa4\u5dee\uff5c\u96fb\u5b50\u8a08\u7b97\u6a5f\u306e\u5bbf\u547d<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/club.informatix.co.jp\/?p=18907\/#%E6%B5%AE%E5%8B%95%E5%B0%8F%E6%95%B0%E7%82%B9%E6%95%B0%E3%81%A8%E5%8D%98%E7%B2%BE%E5%BA%A6%E3%83%BB%E5%80%8D%E7%B2%BE%E5%BA%A6\" >\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u3068\u5358\u7cbe\u5ea6\u30fb\u500d\u7cbe\u5ea6<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/club.informatix.co.jp\/?p=18907\/#Python%E3%81%AE%E8%A8%88%E7%AE%97%E7%B2%BE%E5%BA%A6%E3%80%8C01%E5%95%8F%E9%A1%8C%E3%80%8D\" >Python\u306e\u8a08\u7b97\u7cbe\u5ea6\u300c0.1\u554f\u984c\u300d<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/club.informatix.co.jp\/?p=18907\/#decimal%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB\" >decimal\u30e2\u30b8\u30e5\u30fc\u30eb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/club.informatix.co.jp\/?p=18907\/#2%E3%81%AE%E5%B9%B3%E6%96%B9%E6%A0%B9%E3%82%92100%E6%A1%81%E3%81%AE%E7%B2%BE%E5%BA%A6%E3%81%A7%E8%A8%88%E7%AE%97%E3%81%99%E3%82%8B\" >2\u306e\u5e73\u65b9\u6839\u3092100\u6841\u306e\u7cbe\u5ea6\u3067\u8a08\u7b97\u3059\u308b<\/a><\/li><\/ul><\/nav><\/div>\n\n<h2><span class=\"ez-toc-section\" id=\"%E8%A8%88%E7%AE%97%E8%AA%A4%E5%B7%AE%EF%BD%9C%E9%9B%BB%E5%AD%90%E8%A8%88%E7%AE%97%E6%A9%9F%E3%81%AE%E5%AE%BF%E5%91%BD\"><\/span>\u8a08\u7b97\u8aa4\u5dee\uff5c\u96fb\u5b50\u8a08\u7b97\u6a5f\u306e\u5bbf\u547d<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u96fb\u5b50\u8a08\u7b97\u6a5f\u306e\u8a08\u7b97\u306f\u4e07\u80fd\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u8a08\u7b97\u306b\u306f\u8aa4\u5dee\u304c\u3042\u308a\u307e\u3059\u3002\u96fb\u5b50\u8a08\u7b97\u6a5f\u306e\u8cc7\u6e90\u304c\u6709\u9650\u3060\u304b\u3089\u3067\u3059\u3002\u8a08\u7b97\u306f\u6b63\u78ba\u30fb\u7cbe\u78ba\u306a\u7d50\u679c\u3092\u51fa\u529b\u3067\u304d\u306a\u3051\u308c\u3070\u610f\u5473\u304c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u96fb\u5b50\u8a08\u7b97\u6a5f\u306b\u3068\u3063\u3066\u8a08\u7b97\u8aa4\u5dee\u306f\u30de\u30b7\u30f3\u306e\u8a95\u751f\u306e\u6642\u304b\u3089\u306e\u5bbf\u547d\u3068\u3082\u3044\u3048\u307e\u3059\u3002\u96fb\u5b50\u8a08\u7b97\u6a5f\u306e\u767a\u5c55\u306f\u3001\u8a08\u7b97\u8aa4\u5dee\u3092\u3044\u304b\u306b\u514b\u670d\u3059\u308b\u304b\u3068\u3044\u3046\u96e3\u984c\u306b\u5bfe\u3059\u308b\u30c1\u30e3\u30ec\u30f3\u30b8\u3068\u3068\u3082\u306b\u3042\u3063\u305f\u3068\u3044\u3048\u307e\u3059\u3002<\/p>\n<p>\u9023\u8f09\u7b2c28\u56de\u300c<a href=\"https:\/\/club.informatix.co.jp\/?p=18201\" target=\"_blank\" rel=\"noopener\">\u6700\u5c0f2\u4e57\u6cd5<\/a>\u300d\u3067\u7d39\u4ecb\u3057\u305f\u3088\u3046\u306b18\u4e16\u7d00\u306e\u6570\u5b66\u8005<a href=\"https:\/\/club.informatix.co.jp\/?p=2508\" target=\"_blank\" rel=\"noopener\">\u30ac\u30a6\u30b9<\/a>\u306f\u3001\u5929\u4f53\u89b3\u6e2c\u306b\u3064\u304d\u307e\u3068\u3046\u6e2c\u5b9a\u8aa4\u5dee\u3092\u79d1\u5b66\u3059\u308b\u3053\u3068\u3067\u8aa4\u5dee\u8ad6\u3068\u3044\u3046\u65b0\u3057\u3044\u6570\u5b66\u3092\u3064\u304f\u308a\u3060\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u3068\u540c\u3058\u3088\u3046\u306b\u8a08\u7b97\u306e\u8aa4\u5dee\u3092\u3044\u304b\u306b\u514b\u670d\u3059\u308b\u304b\u3068\u3044\u3046\u96e3\u984c\u306b\u5bfe\u3057\u3001\u69d8\u3005\u306a\u5de5\u592b\u304c\u8003\u6848\u3055\u308c\u3066\u304d\u307e\u3057\u305f\u3002\u3068\u304f\u306b\u30bd\u30d5\u30c8\u306e\u4e16\u754c\u3067\u306f\u3001\u8a08\u7b97\u7cbe\u5ea6\u3092\u5927\u304d\u304f\u3059\u308b\u305f\u3081\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u7814\u7a76\u304c\u9032\u5316\u3057\u307e\u3057\u305f\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E6%B5%AE%E5%8B%95%E5%B0%8F%E6%95%B0%E7%82%B9%E6%95%B0%E3%81%A8%E5%8D%98%E7%B2%BE%E5%BA%A6%E3%83%BB%E5%80%8D%E7%B2%BE%E5%BA%A6\"><\/span>\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u3068\u5358\u7cbe\u5ea6\u30fb\u500d\u7cbe\u5ea6<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u96fb\u5b50\u8a08\u7b97\u6a5f\u3067\u306f\u5c0f\u6570\u30c7\u30fc\u30bf\u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\uff08floating point number\uff09\u3068\u3044\u3046\u5f62\u5f0f\u3067\u8868\u3055\u308c\u307e\u3059\u3002\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u3067\u306f\u6570\u3092\u4eee\u6570\u3068\u6307\u6570\u306b\u5206\u3051\u3066\u8868\u73fe\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: center;\">\u6570 \uff1d \u4eee\u6570 \u00d7 10<sup>\u6307\u6570<\/sup><\/p>\n<p>\u305d\u3057\u3066\u30e1\u30e2\u30ea\u306b\u30c7\u30fc\u30bf\u3092\u683c\u7d0d\u3059\u308b\u969b\u306e\u56fd\u969b\u898f\u7d04\uff08IEEE754\uff09\u304c\u5358\u7cbe\u5ea6\u30fb\u500d\u7cbe\u5ea6\u30fb4\u500d\u7cbe\u5ea6\u3067\u3059\u3002\u5358\u7cbe\u5ea6binary32\u306fCPU\u304c16\u30d3\u30c3\u30c8\u30fb32\u30d3\u30c3\u30c8\u6642\u4ee3\u306e\u4e3b\u6d41\u3067\u3001\u73fe\u5728\u306f<a href=\"https:\/\/club.informatix.co.jp\/?p=1257\" target=\"_blank\" rel=\"noopener\">64\u30d3\u30c3\u30c8<\/a>\u6642\u4ee3\u306a\u306e\u3067\u500d\u7cbe\u5ea6binary64\u304c\u4e3b\u6d41\u3067\u3059\u3002<\/p>\n<p>\u500d\u7cbe\u5ea6binary64\u306f\u3001\u7b26\u53f7\u30d3\u30c3\u30c8\u304c1\u30d3\u30c3\u30c8\u3001\u4eee\u6570\u90e8\u304c52\u30d3\u30c3\u30c8\u3001\u6307\u6570\u90e8\u304c11\u30d3\u30c3\u30c8\u306e\u8a0864\u30d3\u30c3\u30c8\u306e\u69cb\u6210\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u6271\u3048\u308b\u6570\u306e\u7bc4\u56f2\u306f<\/p>\n<p style=\"text-align: center;\">10<sup>-307.95<\/sup> \u301c 10<sup>307.95<\/sup><\/p>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>FPU\uff08Floating Point Unit\uff1a\u6d6e\u52d5\u70b9\u5c0f\u6570\u6f14\u7b97\u51e6\u7406\u88c5\u7f6e\uff09\u306e\u767a\u5c55\u306b\u3088\u308a\u500d\u7cbe\u5ea6\u3084\u62e1\u5f35\u500d\u7cbe\u5ea6\u306e\u8a08\u7b97\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u73fe\u5728\u306ex64\u3068\u547c\u3070\u308c\u308b\u65b0\u3057\u304464\u30d3\u30c3\u30c8CPU\u3067\u306f\u3001FPU\u3092\u4f7f\u308f\u305aSSE2\u3068\u547c\u3070\u308c\u308b\u62e1\u5f35\u547d\u4ee4\u3067\u500d\u7cbe\u5ea6\u5b9f\u6570\u306e\u8a08\u7b97\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6d6e\u52d5\u70b9\u5c0f\u6570\u306e\u8a73\u7d30\u306f2\u9032\u6570\u3067\u8003\u3048\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u8fbc\u307f\u5165\u3063\u3066\u304d\u307e\u3059\u3002\u305d\u308c\u3088\u308a\u3082\u5b9f\u969b\u306ePython\u306e\u8a08\u7b97\u7cbe\u5ea6\u3092\u78ba\u8a8d\u3057\u3066\u3082\u3089\u3046\u65b9\u304c\u5b9f\u611f\u304c\u3042\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Python%E3%81%AE%E8%A8%88%E7%AE%97%E7%B2%BE%E5%BA%A6%E3%80%8C01%E5%95%8F%E9%A1%8C%E3%80%8D\"><\/span>Python\u306e\u8a08\u7b97\u7cbe\u5ea6\u300c0.1\u554f\u984c\u300d<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Python\u30670.1+0.1+0.1\u30680.3\u3092\u6bd4\u8f03\u3057\u3066\u307f\u307e\u3059\u3002\u691c\u8a3c\u306b\u7528\u3044\u308b\u6f14\u7b97\u5b50==\u306f\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3059\u3002\u4e21\u8fba\u304c\u7b49\u3057\u3044\u5834\u5408\u306bTrue\u3001\u7b49\u3057\u304f\u306a\u3044\u5834\u5408\u306bFalse\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>0.1 + 0.1 == 0.2<br \/>\nTrue<br \/>\n0.1 + 0.1 + 0.1 == 0.3<br \/>\nFalse<br \/>\n0.1 + 0.1 + 0.1 +0.1 == 0.4<br \/>\nTrue<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u30010.1+0.1+0.1\u30680.3\u306e\u5834\u5408\u3060\u3051False\u3068\u5224\u5b9a\u3055\u308c\u307e\u3059\u3002\u4e21\u8fba\u306e\u5dee\u3092\u8a08\u7b97\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>0.1+0.1+0.1-0.3<br \/>\n5.551115123125783e-17<\/p>\n<p>\u8a08\u7b97\u8aa4\u5dee\u304c\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u3053\u306e\u72b6\u6cc1\u306e\u8a73\u7d30\u306fPython\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u3042\u308a\u307e\u3059\u3002<br \/>\n15.\u00a0\u6d6e\u52d5\u5c0f\u6570\u70b9\u6f14\u7b97\u3001\u305d\u306e\u554f\u984c\u3068\u5236\u9650<br \/>\n<a href=\"https:\/\/docs.python.org\/ja\/3\/tutorial\/floatingpoint.html\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.python.org\/ja\/3\/tutorial\/floatingpoint.html<\/a><br \/>\n\u3092\u53c2\u7167\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"decimal%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB\"><\/span>decimal\u30e2\u30b8\u30e5\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3053\u306e\u3088\u3046\u306aPython\u306e\u8a08\u7b97\u8aa4\u5dee\u306b\u5bfe\u3059\u308b\u5bfe\u51e6\u65b9\u6cd5\u306f2\u3064\u3042\u308a\u307e\u3059\u3002decimal\u30e2\u30b8\u30e5\u30fc\u30eb\u3068\u591a\u500d\u9577\u6f14\u7b97\u30e9\u30a4\u30d6\u30e9\u30eampmath\u3067\u3059\u3002\u307e\u305a\u306fdecimal\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4f7f\u3044\u65b9\u3092\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>from decimal import Decimal<br \/>\nDecimal(&#8216;0.1&#8217;)+Decimal(&#8216;0.1&#8217;)+Decimal(&#8216;0.1&#8217;) == Decimal(&#8216;0.3&#8217;)<br \/>\nTrue<\/p>\n<p>\u4eca\u5ea6\u306f\u7d50\u679c\u304cTrue\u3068\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3053\u306e\u3088\u3046\u306b\u3001decimal\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u3089Decimal\u95a2\u6570\u3092import\u3057\u3066\u30010.1\u3092Decimal(&#8216;0.1&#8217;)\u3068\u3059\u308b\u3053\u3068\u3067\u8aa4\u5dee\u306e\u306a\u3044\u5c0f\u6570\u3068\u3057\u3066\u6271\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"2%E3%81%AE%E5%B9%B3%E6%96%B9%E6%A0%B9%E3%82%92100%E6%A1%81%E3%81%AE%E7%B2%BE%E5%BA%A6%E3%81%A7%E8%A8%88%E7%AE%97%E3%81%99%E3%82%8B\"><\/span>2\u306e\u5e73\u65b9\u6839\u3092100\u6841\u306e\u7cbe\u5ea6\u3067\u8a08\u7b97\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>decimal\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u6f14\u7b97\u7cbe\u5ea6\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306f28\u6841\u3067\u3059\u3002getcontext()\u95a2\u6570\u3092\u7528\u3044\u308b\u3053\u3068\u3067\u6f14\u7b97\u7cbe\u5ea6\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002Decimal\u578b\u6570\u5024\u306b\u306f\u5e73\u65b9\u6839\u3001\u6307\u6570\u3001\u5bfe\u6570\u306a\u3069\u3092\u8a08\u7b97\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u304c\u5099\u308f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>2\u306e\u5e73\u65b9\u6839\u3092\u6709\u52b9\u6570\u5b57100\u6841\u3067\u8a08\u7b97\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>from decimal import Decimal, getcontext<br \/>\ngetcontext().prec = 100<br \/>\nprint(Decimal(&#8216;2&#8217;).sqrt())<br \/>\n1.414213562373095048801688724209698078569671875376948073176679737990732478462107038850387534327641573<\/p>\n<p>\u307e\u305agetcontext()\u95a2\u6570\u3082\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u3001getcontext().prec\u306b\u6f14\u7b97\u7cbe\u5ea6\uff08\u6709\u52b9\u6570\u5b57\uff09100\u3092\u4ee3\u5165\u3057\u307e\u3059\u3002\uff12\u3092Decimal(&#8216;2&#8217;)\u3068\u3057\u3066sqrt()\u30e1\u30bd\u30c3\u30c9\u3092\u3064\u3051\u307e\u3059\u3002Decimal(&#8216;2&#8217;).sqrt()\u306e\u307e\u307e\u3060\u3068Decimal(&#8216;1.414213\u20267641573&#8217;)\uff08\u3053\u308c\u3092Decimal\u578b\u6570\u5024\u3068\u3044\u3046\uff09\u306e\u3088\u3046\u306b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002print()\u306b\u6e21\u3059\u3053\u3068\u3067\u6570\u5024\u3060\u3051\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>e<sup>2<\/sup>\u3092\u8a08\u7b97\u3059\u308b\u306b\u306fexp()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>print(Decimal(&#8216;2&#8217;).exp())<br \/>\n7.389056098930650227230427460575007813180315570551847324087127822522573796079057763384312485079121795<\/p>\n<p>2\u306e<a href=\"https:\/\/club.informatix.co.jp\/?p=2864\" target=\"_blank\" rel=\"noopener\">\u81ea\u7136\u5bfe\u6570<\/a>log 2 = ln 2\u3092\u8a08\u7b97\u3059\u308b\u306b\u306fln()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>print(Decimal(&#8216;2&#8217;).ln())<br \/>\n0.6931471805599453094172321214581765680755001343602552541206800094933936219696947156058633269964186875<\/p>\n<p>2\u306e\u5e38\u7528\u5bfe\u6570log 2\u3092\u8a08\u7b97\u3059\u308b\u306b\u306flog10()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>print(Decimal(&#8216;2&#8217;).log10())<br \/>\n0.3010299956639811952137388947244930267681898814621085413104274611271081892744245094869272521181861720<\/p>\n<p>\u3053\u306e\u3088\u3046\u306bdecimal\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3088\u308a\u8aa4\u5dee\u304c\u306a\u3044\u6b63\u78ba\u306a\u6f14\u7b97\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3057\u304b\u3057\u8907\u96d1\u306a\u6570\u5f0f\u306b\u5bfe\u3057\u3066\u306f\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p><a href=\"https:\/\/club.informatix.co.jp\/?p=18986\" target=\"_blank\" rel=\"noopener\">\u6b21\u56de<\/a>\u306f\u591a\u500d\u9577\u6f14\u7b97\u30e9\u30a4\u30d6\u30e9\u30eampmath\u306b\u3088\u308b\u8a08\u7b97\u3092\u307f\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8a08\u7b97\u8aa4\u5dee\uff5c\u96fb\u5b50\u8a08\u7b97\u6a5f\u306e\u5bbf\u547d \u96fb\u5b50\u8a08\u7b97\u6a5f\u306e\u8a08\u7b97\u306f\u4e07\u80fd\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u8a08\u7b97\u306b\u306f\u8aa4\u5dee\u304c\u3042\u308a\u307e\u3059\u3002\u96fb\u5b50\u8a08\u7b97\u6a5f\u306e\u8cc7\u6e90\u304c\u6709\u9650\u3060\u304b\u3089\u3067\u3059\u3002\u8a08\u7b97\u306f\u6b63\u78ba\u30fb\u7cbe\u78ba\u306a\u7d50\u679c\u3092\u51fa\u529b\u3067\u304d\u306a\u3051\u308c\u3070\u610f\u5473\u304c\u3042\u308a\u307e\u305b\u3093\u3002 \u96fb\u5b50\u8a08\u7b97\u6a5f\u306b\u3068\u3063 &#8230; <\/p>\n","protected":false},"author":4,"featured_media":18912,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,464,526],"tags":[65],"class_list":["post-18907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-4","category-hito-star-mathmatics","category-526","tag-python"],"jetpack_featured_media_url":"https:\/\/club.informatix.co.jp\/wp-content\/uploads\/2023\/06\/20230602-1.jpg","_links":{"self":[{"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/18907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18907"}],"version-history":[{"count":6,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/18907\/revisions"}],"predecessor-version":[{"id":20769,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/18907\/revisions\/20769"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=\/wp\/v2\/media\/18912"}],"wp:attachment":[{"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}