{"id":200,"date":"2010-03-21T23:43:01","date_gmt":"2010-03-21T14:43:01","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2010\/03\/21\/_8\/"},"modified":"2010-03-21T23:43:01","modified_gmt":"2010-03-21T14:43:01","slug":"_8","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2010\/03\/21\/_8\/","title":{"rendered":"\u4e00\u4eba\u8aad\u66f8\u4f1a \u300c\u8a08\u7b97\u6a5f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u69cb\u9020\u3068\u89e3\u91c8\u300d (8)"},"content":{"rendered":"<p><a href=\"http:\/\/www.amazon.co.jp\/dp\/489471163X?tag=typea09-22&amp;link_code=as3&amp;creativeASIN=489471163X&amp;creative=3999&amp;camp=767\"><img decoding=\"async\" src=\"http:\/\/images-jp.amazon.com\/images\/P\/489471163X.09.MZZZZZZZ.jpg\" complete=\"complete\"><\/a> <\/p>\n<p>&nbsp;<\/p>\n<h2>1.1.7 Newton \u6cd5\u306b\u3088\u308b\u5e73\u65b9\u6839<\/h2>\n<p>&nbsp;<\/p>\n<h3>\u554f\u984c\u30001.8<\/h3>\n<h3>\u7acb\u65b9\u6839\u3092\u3068\u308bNewton\u6cd5\u306f y \u304c x \u306e\u7acb\u65b9\u6839\u306e\u8fd1\u4f3c\u5024\u306a\u3089\u3001\u3088\u308a\u3088\u3044\u8fd1\u4f3c\u306f\u4ee5\u4e0b\u306e\u5024\u3067\u4e0e\u3048\u3089\u308c\u308b\u3068\u3044\u3046\u4e8b\u5b9f\u306b\u3088\u3063\u3066\u3044\u308b\u3002\u3053\u306e\u624b\u7d9a\u304d\u3092\u5b9f\u88c5\u305b\u3088\u3002<\/h3>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/2_A5CE\/newton06_01.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"newton06_01\" border=\"0\" alt=\"newton06_01\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/2_A5CE\/newton06_01_thumb.jpg\" width=\"74\" height=\"67\"><\/a> <\/p>\n<p>\u307e\u305a\u3001\u5e73\u65b9\u6839\u540c\u69d8\u306b\u3001\u5f0f\u3092<a href=\"\/blg\/glob\/2010\/03\/_5.html\" target=\"_blank\">\u78ba\u8a8d<\/a>\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/2_A5CE\/newton06_02.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"newton06_02\" border=\"0\" alt=\"newton06_02\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/2_A5CE\/newton06_02_thumb.jpg\" width=\"386\" height=\"93\"><\/a> <\/p>\n<p>\u7d0d\u5f97\u3044\u3063\u305f\u3002<\/p>\n<p>\u3044\u304d\u306a\u308aScheme\u3067\u304b\u3051\u308b\u307b\u3069\u8a33\u304c\u308f\u304b\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u307e\u305a\u306f\u3001\u30a4\u30e1\u30fc\u30b8\u3092\u3064\u304b\u3080\u305f\u3081\u306b\u3001Python \u3067\u30b0\u30e9\u30d5\u3092\u66f8\u3044\u3066\u307f\u308b\u30025 \u306e\u7acb\u65b9\u6839\u3092\u8a08\u7b97\u3002<\/p>\n<pre class=\"prettyprint linenums\"># -*- encoding:utf-8 -*-\r\n'''\r\nNewton \u8fd1\u4f3c\u306b\u3088\u308a\u3001\u5e73\u65b9\u6839\u3092\u6c42\u3081\u308b\u30b5\u30f3\u30d7\u30eb\r\n'''\r\n\r\nfrom pylab import *\r\nfrom numpy import *\r\nfrom numpy.ma.core import arange\r\nfrom decimal import *\r\n\r\ndef d(x):\r\n    return Decimal(x)\r\n\r\ncube = lambda x, b : d(x) ** d('3') - d(b)         \r\nnewton = lambda target, guess : (d(target) \/ (d(guess) ** d('2')) + (d('2') * d(guess))) \/ d('3')\r\n\r\ndef f1(x_range, target, interval):\r\n    x = arange(d(x_range[0]), d(x_range[1]), d(interval))\r\n    y = [cube(y1, target) for y1 in x]\r\n\r\n    return (x, y)\r\n\r\nif __name__ == '__main__':\r\n    grid(True)\r\n    getcontext().prec = 8\r\n    target = d('5')\r\n    \r\n    # 3\u6b21\u5143\u306e\u30b0\u30e9\u30d5\r\n    x, y = f1(('-6','8'),target, '0.1')\r\n    plot(x,y)\r\n\r\n    guess = d('6.0')\r\n    repeat = 8\r\n    for i in range(repeat):\r\n        x = (guess, guess)\r\n        y = (d('0'), cube(guess, target))\r\n        plot(x, y, 'k--')\r\n\r\n        new_guess = newton(target, guess)\r\n        \r\n        x = (guess, new_guess)\r\n        y = (cube(guess, target), d('0'))\r\n        plot(x, y)\r\n    \r\n        guess = new_guess\r\n        print guess\r\n\r\n    show()\r\n<\/pre>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/2_A5CE\/newton06_03.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"newton06_03\" border=\"0\" alt=\"newton06_03\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/2_A5CE\/newton06_03_thumb.jpg\" width=\"415\" height=\"347\"><\/a> <\/p>\n<p>\u4eca\u65e5\u306f\u3053\u3053\u307e\u3067\u3002<\/p>\n<p>\u6b21\u306f\u3001\u3053\u308c\u3092 Scheme \u306b\u79fb\u690d\u3057\u3066\u307f\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; 1.1.7 Newton \u6cd5\u306b\u3088\u308b\u5e73\u65b9\u6839 &nbsp; \u554f\u984c\u30001.8 \u7acb\u65b9\u6839\u3092\u3068\u308bNewton\u6cd5\u306f y \u304c x \u306e\u7acb\u65b9\u6839\u306e\u8fd1\u4f3c\u5024\u306a\u3089\u3001\u3088\u308a\u3088\u3044\u8fd1\u4f3c\u306f\u4ee5\u4e0b\u306e\u5024\u3067\u4e0e\u3048\u3089\u308c\u308b\u3068\u3044\u3046\u4e8b\u5b9f\u306b\u3088\u3063\u3066\u3044\u308b\u3002\u3053\u306e\u624b\u7d9a\u304d\u3092\u5b9f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[33,20,34,35,36],"tags":[],"class_list":["post-200","post","type-post","status-publish","format-standard","hentry","category-lisp","category-python","category-scheme","category-math","category-reading"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=200"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/200\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}