<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mzp</author_name>
  <author_url>https://blog.hatena.ne.jp/mzp/</author_url>
  <blog_title>みずぴー日記</blog_title>
  <blog_url>https://mzp.hatenadiary.org/</blog_url>
  <categories>
    <anon>30分プログラム</anon>
    <anon>Python</anon>
  </categories>
  <description>30分シリーズ。その9。ネタがねぇ。 今回はニュートン法。数値計算の教科書までもひっぱり出した。いやね、アルゴリズムの本はすべからく手続き的・反復的に書いてあるのよ。それを、再帰で書き直していると30分で終わらないのです。というわけで、今回はニュートン法で二乗根、三乗根、10乗根を求めてみた。 $ python newton.py sqrt(2) = 1.41421 cubic_root(2) = 1.25992 root(2,10) = 1.0717734625def newton(f,x,delta=0.1): new = x-f(x) if abs(new - x) &lt; delta: r…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmzp.hatenadiary.org%2Fentry%2F20070426%2Fnewton&quot; title=&quot;newton.py - みずぴー日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.d.st-hatena.com/diary/mzp/2007-04-26.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2007-04-26 00:00:00</published>
  <title>newton.py</title>
  <type>rich</type>
  <url>https://mzp.hatenadiary.org/entry/20070426/newton</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
