{"id":18986,"date":"2023-07-03T00:15:20","date_gmt":"2023-07-03T00:15:20","guid":{"rendered":"https:\/\/club.informatix.co.jp\/?p=18986"},"modified":"2024-11-05T06:47:15","modified_gmt":"2024-11-05T06:47:15","slug":"python%e3%81%a7%e6%95%b0%e5%80%a4%e8%a8%88%e7%ae%97%e3%80%80mpmath%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%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=18986","title":{"rendered":"Python\u3067\u6570\u5024\u8a08\u7b97\u3000mpmath\u30e9\u30a4\u30d6\u30e9\u30ea\u7de8\uff5cPython\u3067\u6570\u5b66\u3092\u5b66\u307c\u3046\uff01 \u7b2c34\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-69f26bc7a418c\" 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-69f26bc7a418c\" 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=18986\/#Rump%E3%81%AE%E4%BE%8B%E9%A1%8C\" >Rump\u306e\u4f8b\u984c<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/club.informatix.co.jp\/?p=18986\/#%E9%9B%BB%E5%AD%90%E8%A8%88%E7%AE%97%E6%A9%9F%E3%81%AB%E3%82%88%E3%82%8B%E8%A8%88%E7%AE%97%E3%81%AE%E5%A4%B1%E6%95%97%E4%BA%8B%E4%BE%8B_%E3%81%9D%E3%81%AE1%EF%BD%9C%E6%B9%BE%E5%B2%B8%E6%88%A6%E4%BA%89%EF%BC%881991%E5%B9%B4%EF%BC%89\" >\u96fb\u5b50\u8a08\u7b97\u6a5f\u306b\u3088\u308b\u8a08\u7b97\u306e\u5931\u6557\u4e8b\u4f8b \u305d\u306e1\uff5c\u6e7e\u5cb8\u6226\u4e89\uff081991\u5e74\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/club.informatix.co.jp\/?p=18986\/#%E9%9B%BB%E5%AD%90%E8%A8%88%E7%AE%97%E6%A9%9F%E3%81%AB%E3%82%88%E3%82%8B%E8%A8%88%E7%AE%97%E3%81%AE%E5%A4%B1%E6%95%97%E4%BA%8B%E4%BE%8B_%E3%81%9D%E3%81%AE2%EF%BD%9C%E3%82%A2%E3%83%AA%E3%82%A2%E3%83%B35%E3%83%AD%E3%82%B1%E3%83%83%E3%83%88%E4%BA%8B%E6%95%85%EF%BC%881996%E5%B9%B4%EF%BC%89\" >\u96fb\u5b50\u8a08\u7b97\u6a5f\u306b\u3088\u308b\u8a08\u7b97\u306e\u5931\u6557\u4e8b\u4f8b \u305d\u306e2\uff5c\u30a2\u30ea\u30a2\u30f35\u30ed\u30b1\u30c3\u30c8\u4e8b\u6545\uff081996\u5e74\uff09<\/a><\/li><\/ul><\/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=18986\/#%E7%B2%BE%E5%BA%A6%E4%BF%9D%E8%A8%BC%E4%BB%98%E3%81%8D%E6%95%B0%E5%80%A4%E8%A8%88%E7%AE%97%EF%BD%9Cdecimal%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%81%AE%E5%A0%B4%E5%90%88\" >\u7cbe\u5ea6\u4fdd\u8a3c\u4ed8\u304d\u6570\u5024\u8a08\u7b97\uff5cdecimal\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5834\u5408<\/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=18986\/#%E7%B2%BE%E5%BA%A6%E4%BF%9D%E8%A8%BC%E4%BB%98%E3%81%8D%E6%95%B0%E5%80%A4%E8%A8%88%E7%AE%97%EF%BD%9Cmpmath%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%81%AE%E5%A0%B4%E5%90%88\" >\u7cbe\u5ea6\u4fdd\u8a3c\u4ed8\u304d\u6570\u5024\u8a08\u7b97\uff5cmpmath\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5834\u5408<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/club.informatix.co.jp\/?p=18986\/#UNIX_bc%E3%81%AB%E3%82%88%E3%82%8B%E4%BB%BB%E6%84%8F%E7%B2%BE%E5%BA%A6%E6%BC%94%E7%AE%97\" >UNIX bc\u306b\u3088\u308b\u4efb\u610f\u7cbe\u5ea6\u6f14\u7b97<\/a><\/li><\/ul><\/nav><\/div>\n\n<h2><span class=\"ez-toc-section\" id=\"Rump%E3%81%AE%E4%BE%8B%E9%A1%8C\"><\/span>Rump\u306e\u4f8b\u984c<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>1988\u5e74\u3001IBM\u30c9\u30a4\u30c4\u57fa\u790e\u7814\u7a76\u6240\u306eSiegfried M. Rump\u306f\u96fb\u5b50\u8a08\u7b97\u6a5f\u306b\u3088\u308b\u8a08\u7b97\u8aa4\u5dee\u3092\u793a\u3059\u305f\u3081\u306e\u8208\u5473\u6df1\u3044\u6570\u5024\u8a08\u7b97\u554f\u984c\u3092\u8003\u3048\u305f\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-18994\" src=\"https:\/\/club.informatix.co.jp\/wp-content\/uploads\/2023\/06\/20230630-1.jpg\" alt=\"\" width=\"500\" height=\"328\" srcset=\"https:\/\/club.informatix.co.jp\/wp-content\/uploads\/2023\/06\/20230630-1.jpg 723w, https:\/\/club.informatix.co.jp\/wp-content\/uploads\/2023\/06\/20230630-1-300x197.jpg 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u3053\u308c\u3092Python\u3067\u8a08\u7b97\u3057\u3066\u307f\u305f\u7d50\u679c\u306f\u6b21\u306e\u901a\u308a\u3002<\/p>\n<p>&gt;&gt;&gt;\u00a0 a=77617<br \/>\n&gt;&gt;&gt;\u00a0 b=33096<br \/>\n&gt;&gt;&gt;\u00a0 c=333.75*b**6+a**2*(11*a**2*b**2-b**6-121*b**4-2)+5.5*b**8+a\/(2*b)<br \/>\n&gt;&gt;&gt;\u00a0 print(c)<br \/>\n1.1805916207174113e+21<\/p>\n<p>\u3053\u306ePython\u306b\u3088\u308b\u8a08\u7b97\u7d50\u679c\u306fe+21\uff0810\u306e21\u4e57\uff09\u3067\u3042\u308b\u3053\u3068\u304b\u3089\u3001Rump\u306e\u8ad6\u6587\u306b\u3042\u308b\u7d50\u679c1.17\u2026\u3068\u306f\u5168\u304f\u7570\u306a\u308b\u6570\u5024\u3067\u3059\u3002<\/p>\n<p>\u771f\u5024\u306f-0.827396\u2026\u3067\u3059\u304b\u3089\u3001\u901a\u5e38\u306e\u96fb\u5b50\u8a08\u7b97\u6a5f\u306b\u3088\u308b\u8a08\u7b97\u7d50\u679c\u306f\u7b26\u53f7\u3082\u5024\u3082\u7570\u306a\u308b\u3068\u3044\u3046\u975e\u5e38\u306b\u8208\u5473\u6df1\u3044\u7d50\u679c\u3067\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u96fb\u5b50\u8a08\u7b97\u6a5f\u3060\u304b\u3089\u6b63\u3057\u3044\u3068\u3044\u3046\u306e\u306f\u795e\u8a71\u3067\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u672c\u9023\u8f09\u300c<a href=\"https:\/\/club.informatix.co.jp\/?p=664\" target=\"_blank\" rel=\"noopener\">\u30ad\u30e3\u30b5\u30ea\u30f3\u30fb\u30b8\u30e7\u30f3\u30bd\u30f3\uff5c\u8ecc\u9053\u8a08\u7b97\u3067NASA\u5b87\u5b99\u8a08\u753b\u3092\u652f\u3048\u305f\u9ed2\u4eba\u5973\u6027\u6570\u5b66\u8005<\/a>\u300d\u3067\u3082\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u30011962\u5e74\u306e\u5b87\u5b99\u8239\u30d5\u30ec\u30f3\u30c9\u30b7\u30c3\u30d77\u306b\u3088\u308b\u8ecc\u9053\u8a08\u7b97\u306b\u3064\u3044\u3066\u5b87\u5b99\u98db\u884c\u58eb\u30b8\u30e7\u30f3\u30fb\u30b0\u30ec\u30f3\u304c\u96fb\u5b50\u8a08\u7b97\u6a5f\u306e\u8a08\u7b97\u3092\u4fe1\u7528\u3067\u304d\u305a\u300c\u30ad\u30e3\u30b5\u30ea\u30f3\u306b\u8a08\u7b97\u3055\u305b\u306a\u3044\u9650\u308a\u98db\u3070\u306a\u3044\u300d\u3068\u8a00\u3063\u305f\u9038\u8a71\u304c\u601d\u3044\u51fa\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E9%9B%BB%E5%AD%90%E8%A8%88%E7%AE%97%E6%A9%9F%E3%81%AB%E3%82%88%E3%82%8B%E8%A8%88%E7%AE%97%E3%81%AE%E5%A4%B1%E6%95%97%E4%BA%8B%E4%BE%8B_%E3%81%9D%E3%81%AE1%EF%BD%9C%E6%B9%BE%E5%B2%B8%E6%88%A6%E4%BA%89%EF%BC%881991%E5%B9%B4%EF%BC%89\"><\/span>\u96fb\u5b50\u8a08\u7b97\u6a5f\u306b\u3088\u308b\u8a08\u7b97\u306e\u5931\u6557\u4e8b\u4f8b \u305d\u306e1\uff5c\u6e7e\u5cb8\u6226\u4e89\uff081991\u5e74\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>1962\u5e74\u306e\u8a71\u306f\u6614\u8a71\u3060\u308d\u3046\u3068\u601d\u3044\u304d\u3084\u3001\u5b9f\u306f\u305d\u3046\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u96fb\u5b50\u8a08\u7b97\u6a5f\u306e\u8a08\u7b97\u8aa4\u5dee\u306b\u3088\u308b\u6df1\u523b\u306a\u4e8b\u4ef6\u306f\u305d\u306e\u5f8c\u3082\u7d9a\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>1991\u5e74\u306e\u6e7e\u5cb8\u6226\u4e89\u306e\u6700\u4e2d\u3001\u7c73\u8ecd\u5175\u820e\u3092\u72d9\u3063\u3066\u767a\u5c04\u3055\u308c\u305f\u30b9\u30ab\u30c3\u30c9\u30df\u30b5\u30a4\u30eb\u3092\u30d1\u30c8\u30ea\u30aa\u30c3\u30c8\u30df\u30b5\u30a4\u30eb\u306b\u3088\u3063\u3066\u8fce\u6483\u3059\u308b\u306e\u304c\u5931\u6557\u306b\u7d42\u308f\u308a\u5175\u58eb28\u540d\u306e\u547d\u304c\u5931\u308f\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u30b7\u30b9\u30c6\u30e0\u8d77\u52d5\u304b\u3089\u306e\u7d4c\u904e\u6642\u9593\u8a08\u6e2c\u306e\u8a08\u7b97\u306b\u8a08\u7b97\u8aa4\u5dee\u304c\u5f71\u97ff\u3057\u305f\u3053\u3068\u304c\u539f\u56e0\u3068\u3055\u308c\u3066\u3044\u307e\u3059\u3002<a href=\"https:\/\/club.informatix.co.jp\/?p=18907\" target=\"_blank\" rel=\"noopener\">\u524d\u56de<\/a>\u7d39\u4ecb\u3057\u305f\u300cPython\u306e\u8a08\u7b97\u7cbe\u5ea6\u300c0.1\u554f\u984c\u300d\u300d\u3067\u3059\u300210\u9032\u6570\u306e0.1\u306f\u30012\u9032\u6570\u3067\u306f0.0001100110011\u2026\u3068\u306a\u308a\u6709\u9650\u6841\u3067\u306f\u8868\u73fe\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E9%9B%BB%E5%AD%90%E8%A8%88%E7%AE%97%E6%A9%9F%E3%81%AB%E3%82%88%E3%82%8B%E8%A8%88%E7%AE%97%E3%81%AE%E5%A4%B1%E6%95%97%E4%BA%8B%E4%BE%8B_%E3%81%9D%E3%81%AE2%EF%BD%9C%E3%82%A2%E3%83%AA%E3%82%A2%E3%83%B35%E3%83%AD%E3%82%B1%E3%83%83%E3%83%88%E4%BA%8B%E6%95%85%EF%BC%881996%E5%B9%B4%EF%BC%89\"><\/span>\u96fb\u5b50\u8a08\u7b97\u6a5f\u306b\u3088\u308b\u8a08\u7b97\u306e\u5931\u6557\u4e8b\u4f8b \u305d\u306e2\uff5c\u30a2\u30ea\u30a2\u30f35\u30ed\u30b1\u30c3\u30c8\u4e8b\u6545\uff081996\u5e74\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>ESA\uff08\u6b27\u5dde\u5b87\u5b99\u6a5f\u95a2\uff09\u306e\u30a2\u30ea\u30a2\u30f35\u30ed\u30b1\u30c3\u30c8\u306f10\u5e74\u8fd1\u304f\u306e\u6b73\u6708\u306870\u5104\u30c9\u30eb\u306e\u8cbb\u7528\u3092\u6295\u3058\u3066\u958b\u767a\u3055\u308c\u307e\u3057\u305f\u30021996\u5e74\u306b\u30ed\u30b1\u30c3\u30c8\u306f\u96e2\u9678\u76f4\u5f8c\u306b\u7206\u767a\u3057\u6253\u3061\u4e0a\u3052\u306f\u5931\u6557\u306b\u7d42\u308f\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u539f\u56e0\u306f\u3001\u6163\u6027\u5ea7\u6a19\u30b7\u30b9\u30c6\u30e0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u30a8\u30e9\u30fc\u3002\u30ed\u30b1\u30c3\u30c8\u306e\u6c34\u5e73\u901f\u5ea6\u306b\u95a2\u9023\u3059\u308b64\u30d3\u30c3\u30c8\u6d6e\u52d5\u5c0f\u6570\u70b9\u309216\u30d3\u30c3\u30c8\u7b26\u53f7\u4ed8\u6574\u6570\u3078\u5909\u63db\u3059\u308b\u969b\u3001\u6570\u5b57\u304c16\u30d3\u30c3\u30c8\u7b26\u53f7\u4ed8\u6574\u6570\u3068\u3057\u3066\u4fdd\u5b58\u3067\u304d\u308b\u6700\u5927\u5024\u306e32,768\u3092\u8d85\u3048\u3066\u3057\u307e\u3044\u3001\u30a8\u30e9\u30fc\u3092\u5f15\u304d\u8d77\u3053\u3057\u3066\u3057\u307e\u3063\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E7%B2%BE%E5%BA%A6%E4%BF%9D%E8%A8%BC%E4%BB%98%E3%81%8D%E6%95%B0%E5%80%A4%E8%A8%88%E7%AE%97%EF%BD%9Cdecimal%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%81%AE%E5%A0%B4%E5%90%88\"><\/span>\u7cbe\u5ea6\u4fdd\u8a3c\u4ed8\u304d\u6570\u5024\u8a08\u7b97\uff5cdecimal\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5834\u5408<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u305d\u3053\u3067\u5fc5\u8981\u306b\u306a\u308b\u306e\u304c\u300c\u7cbe\u5ea6\u4fdd\u8a3c\u4ed8\u304d\u6570\u5024\u8a08\u7b97\u300d\u3068\u547c\u3070\u308c\u308b\u6280\u8853\u3067\u3059\u3002<a href=\"https:\/\/club.informatix.co.jp\/?p=18907\" target=\"_blank\" rel=\"noopener\">\u524d\u56de<\/a>\u7d39\u4ecb\u3057\u305fdecimal\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u305d\u306e1\u3064\u3067\u3059\u3002\u3055\u3063\u305d\u304fRump\u306e\u4f8b\u984c\u3092\u8a08\u7b97\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>&gt;&gt;&gt; from decimal import Decimal, getcontext<br \/>\n&gt;&gt;&gt; getcontext().prec = 50<br \/>\n&gt;&gt;&gt; a = Decimal(&#8216;77617&#8217;)<br \/>\n&gt;&gt;&gt; b = Decimal(&#8216;33096&#8217;)<br \/>\n&gt;&gt;&gt; c = Decimal(&#8216;333.75&#8217;)*b**6+a**2*(11*a**2*b**2-b**6-121*b**4-2)+Decimal(&#8216;5.5&#8217;)*b**8+a\/(2*b)<br \/>\n&gt;&gt;&gt; print(c)<br \/>\n-0.8273960599468213681411650954798162919990331157844<\/p>\n<p>\u771f\u5024\u304c\u5f97\u3089\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3068\u3053\u308d\u304cdecimal\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3088\u308b\u4efb\u610f\u7cbe\u5ea6\u6f14\u7b97\u306f\u9ad8\u5ea6\u306a\u6280\u8853\u8a08\u7b97\u306b\u306f\u4e0d\u5411\u304d\u3067\u3059\u3002sin(0.1)\u3092\u8a08\u7b97\u3055\u305b\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>&gt;&gt;&gt; from decimal import Decimal, getcontext<br \/>\n&gt;&gt;&gt; getcontext().prec = 50<br \/>\n&gt;&gt;&gt; import math<br \/>\n&gt;&gt;&gt; math.sin(0.1)<br \/>\n0.09983341664682815<br \/>\n&gt;&gt;&gt; math.sin(Decimal(&#8216;0.1&#8217;))<br \/>\n0.09983341664682815<\/p>\n<p>sin(0.1)\u306e\u771f\u5024\u306f<br \/>\n0.09983341664682815230681419<br \/>\n\u3067\u3059\u304b\u3089\u5c0f\u6570\u70b9\u4ee5\u4e0b17\u6841\u306f\u6b63\u3057\u3044\u7d50\u679c\u3067\u3059\u3002\u3057\u304b\u3057math.sin(Decimal(&#8216;0.1&#8217;))\u3068\u3057\u3066\u3082\u7cbe\u5ea6\u309250\u6841\u306b\u6307\u5b9a\u3057\u305f\u306e\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u3001\u5c0f\u6570\u70b9\u4ee5\u4e0b17\u6841\u3057\u304b\u5f97\u3089\u308c\u307e\u305b\u3093\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E7%B2%BE%E5%BA%A6%E4%BF%9D%E8%A8%BC%E4%BB%98%E3%81%8D%E6%95%B0%E5%80%A4%E8%A8%88%E7%AE%97%EF%BD%9Cmpmath%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%81%AE%E5%A0%B4%E5%90%88\"><\/span>\u7cbe\u5ea6\u4fdd\u8a3c\u4ed8\u304d\u6570\u5024\u8a08\u7b97\uff5cmpmath\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5834\u5408<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>mpmath\u306fPython\u306e\u4efb\u610f\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u6f14\u7b97\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u3059\u3002sin(0.1)\u309250\u6841\u306e\u7cbe\u5ea6\u3067\u8a08\u7b97\u3059\u308b\u306b\u306f\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>&gt;&gt;&gt; from mpmath import mp<br \/>\n&gt;&gt;&gt; mp.dps = 50<br \/>\n&gt;&gt;&gt; mp.pretty = True<br \/>\n&gt;&gt;&gt; mp.sin(mp.mpf(&#8216;0.1&#8217;))<br \/>\n0.099833416646828152306814198410622026989915388017982<\/p>\n<p>2\u884c\u76ee\u306emp.dps\u306f10\u9032\u7cbe\u5ea6\u3067\u3059\u3002mp.prec\u30672\u9032\u7cbe\u5ea6\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002<br \/>\n3\u884c\u76ee\u306emp.pretty\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u304cFalse\u3067\u3059\u3002False\u3060\u3068print()\u306b\u6e21\u3057\u3066\u3042\u3052\u306a\u3044\u3068\u3001\u304d\u308c\u3044\u306a\u6570\u5024\u51fa\u529b\u306b\u306a\u308a\u307e\u305b\u3093\u3002mp.pretty = True\u3068\u3059\u308b\u3053\u3068\u3067print()\u306b\u6e21\u3059\u3053\u3068\u306a\u304f\u304d\u308c\u3044\u306a\u6570\u5024\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<br \/>\nPython\u3067\u4e09\u89d2\u95a2\u6570\u3092\u6271\u3046\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002\u3053\u3053\u3067\u306fmp.sin()\u304c\u4f7f\u3048\u307e\u3059\u3002\u305d\u3053\u306b0.1\u3092mp.mpf(&#8216;0.1&#8217;)\u3068\u3057\u3066\u6e21\u3059\u3053\u3068\u3067\u4efb\u610f\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u6f14\u7b97\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>sin(0.1)\u306e\u771f\u5024\uff08\u5c0f\u6570\u70b9\u4ee5\u4e0b50\u6841\uff09\u306f<br \/>\n0.099833416646828152306814198410622026989915388017982<br \/>\n\u3067\u3059\u304b\u3089\u3001\u30b8\u30e3\u30b9\u30c8\u306a\u5024\u3067\u3042\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Rump\u306e\u4f8b\u984c\u3092\u8a08\u7b97\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>&gt;&gt;&gt; from mpmath import mp<br \/>\n&gt;&gt;&gt; mp.dps = 50<br \/>\n&gt;&gt;&gt; mp.pretty = True<br \/>\n&gt;&gt;&gt; a = mp.mpf(&#8216;77617&#8217;)<br \/>\n&gt;&gt;&gt; b = mp.mpf(&#8216;33096&#8217;)<br \/>\n&gt;&gt;&gt; 333.75*b**6+a**2*(11*a**2*b**2-b**6-121*b**4-2)+5.5*b**8+a\/(2*b)<br \/>\n-0.82739605994682136814116509547981629199903311578438<\/p>\n<p>\u771f\u5024\u304c\u5f97\u3089\u308c\u307e\u3057\u305f\u3002<br \/>\nmp.mpf()\u306f\u5b9f\u6570\u3092\u6271\u3046\u5834\u5408\u306b\u7528\u3044\u307e\u3059\u3002mp.mpc()\u3067\u8907\u7d20\u6570\u3001mp.matrix()\u3067\u884c\u5217\u3092\u5f15\u6570\u306b\u6e21\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"UNIX_bc%E3%81%AB%E3%82%88%E3%82%8B%E4%BB%BB%E6%84%8F%E7%B2%BE%E5%BA%A6%E6%BC%94%E7%AE%97\"><\/span>UNIX bc\u306b\u3088\u308b\u4efb\u610f\u7cbe\u5ea6\u6f14\u7b97<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3053\u306e\u3088\u3046\u306bPython\u3067\u7cbe\u5ea6\u4fdd\u8a3c\u4ed8\u304d\u6570\u5024\u8a08\u7b97\u3001\u4efb\u610f\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u6f14\u7b97\u3092\u884c\u3046\u306b\u306fdecimal\u30e2\u30b8\u30e5\u30fc\u30eb\u307e\u305f\u306fmpmath\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002\u4f7f\u3044\u52dd\u624b\u3082\u7c21\u5358\u3067\u306f\u306a\u304f\u3001\u6163\u308c\u304c\u5fc5\u8981\u3067\u3059\u3002\u8a08\u7b97\u7d50\u679c\u304c\u771f\u5024\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u304b\u3081\u308b\u305f\u3081\u306b\u3001\u79c1\u306fUNIX\u306ebc\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>bc\u306e\u4efb\u610f\u7cbe\u5ea6\u6f14\u7b97\u306f\u697d\u3067\u4fbf\u5229\u3067\u3059\u3002bc\u306b\u3088\u308bRump\u306e\u4f8b\u984c<\/p>\n<p>&gt;&gt;&gt; scale = 50<br \/>\n&gt;&gt;&gt; a=77617<br \/>\n&gt;&gt;&gt; b=33096<br \/>\n&gt;&gt;&gt; 333.75*b^6+a^2*(11*a^2*b^2-b^6-121*b^4-2)+5.5*b^8+a\/(2*b)<br \/>\n&gt;&gt;&gt; -.82739605994682136814116509547981629199903311578439<\/p>\n<p>\u30e2\u30b8\u30e5\u30fc\u30eb\u4e0d\u5fc5\u8981\u3001\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3060\u3051\u3067\u771f\u5024\u304c\u5f97\u3089\u308c\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306bPython\u3068bc\u306e\u4e21\u65b9\u3092\u4f7f\u3044\u306a\u304c\u3089\u7cbe\u5ea6\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rump\u306e\u4f8b\u984c 1988\u5e74\u3001IBM\u30c9\u30a4\u30c4\u57fa\u790e\u7814\u7a76\u6240\u306eSiegfried M. Rump\u306f\u96fb\u5b50\u8a08\u7b97\u6a5f\u306b\u3088\u308b\u8a08\u7b97\u8aa4\u5dee\u3092\u793a\u3059\u305f\u3081\u306e\u8208\u5473\u6df1\u3044\u6570\u5024\u8a08\u7b97\u554f\u984c\u3092\u8003\u3048\u305f\u3002 \u3053\u308c\u3092Python\u3067\u8a08\u7b97\u3057\u3066\u307f\u305f\u7d50\u679c\u306f\u6b21\u306e\u901a &#8230; <\/p>\n","protected":false},"author":4,"featured_media":18994,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,464,526],"tags":[65],"class_list":["post-18986","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\/20230630-1.jpg","_links":{"self":[{"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/18986","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=18986"}],"version-history":[{"count":6,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/18986\/revisions"}],"predecessor-version":[{"id":20770,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/18986\/revisions\/20770"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=\/wp\/v2\/media\/18994"}],"wp:attachment":[{"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/club.informatix.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}