<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>obelisk2</author_name>
  <author_url>https://blog.hatena.ne.jp/obelisk2/</author_url>
  <blog_title>Camera Obscura</blog_title>
  <blog_url>https://obelisk.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>数学</anon>
    <anon>アルゴリズム</anon>
  </categories>
  <description>Rubyによる情報科学入門作者:久野 靖近代科学社Amazon方程式 f(x) = 0 を ある区間 [a, b] において、f(x) が単調増加、連続、f(a) 0 であるとして、数値計算で解いてみます。具体的には n の平方根を求めてみます。 区間2分法 区間の中点をとってその点での値を評価し、左右の適切な区間を選択して再帰的に追い詰めていきます。 def binary_search(n) a = 0; b = n while (a - b).abs &gt; 0.000000000000001 c = (a + b) / 2.0 if c * c &gt; n b = c else a = c en…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2016%2F08%2F16%2F233516&quot; title=&quot;1変数方程式を数値計算で解く（Ruby） - Camera Obscura&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>http://ecx.images-amazon.com/images/I/41rCJqpqShL.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-08-16 23:35:16</published>
  <title>1変数方程式を数値計算で解く（Ruby）</title>
  <type>rich</type>
  <url>https://obelisk.hatenablog.com/entry/2016/08/16/233516</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
