<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hecomi</author_name>
  <author_url>https://blog.hatena.ne.jp/hecomi/</author_url>
  <blog_title>凹みTips</blog_title>
  <blog_url>https://tips.hecomi.com/</blog_url>
  <categories>
    <anon>数値計算</anon>
    <anon>C++</anon>
  </categories>
  <description>方程式の答え簡単に出ないかなー…，と考えてるあなた．boost::lambdaを使えば「2行」で解けます． boost::function&lt;double(double)&gt; f = _1*_1 - 3*_1 + 2; // f(x) = (x-1)(x-2) std::cout &lt;&lt; root(0.6, 1.3, f) &lt;&lt; std::endl; // 1 /* std::cout &lt;&lt; root(1.3, 2.4, f) &lt;&lt; std::endl; // 2 */ ええ！？これだけ？なぞと書いてみましたが，実際には二分法によって方程式の解を求める関数rootを作らなければならないので，もっと長…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftips.hecomi.com%2Fentry%2F20100712%2F1278929027&quot; title=&quot;boost::lambdaを使って2行で方程式の解を求める - 凹みTips&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-07-12 19:03:47</published>
  <title>boost::lambdaを使って2行で方程式の解を求める</title>
  <type>rich</type>
  <url>https://tips.hecomi.com/entry/20100712/1278929027</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
