<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>wrongwrongwrongwrong163377</author_name>
  <author_url>https://blog.hatena.ne.jp/wrongwrongwrongwrong163377/</author_url>
  <blog_title>wrongwrongな開発日記</blog_title>
  <blog_url>https://wrongwrong163377.hatenablog.com/</blog_url>
  <categories>
    <anon>プログラミング</anon>
    <anon>Kotlin</anon>
  </categories>
  <description>wrongwrong163377.hatenablog.com 続きです。 数値解析などで用いる反復法も末尾再帰で書いたほうがシンプルになりました。 ということで、今回は例としてニュートン法を実装します。 ニュートン法の解説はネット上にきちんとしたものが有ると思うので飛ばします。 実装 解説は大体コメントに書きました。 閾値にはFloat.MIN_VALUEを指定していますが、これは計算機的に十分小さな値という意味で指定しています。 import kotlin.math.abs tailrec fun newton( f: (Double)-&gt; Double, //f(x) df: (Doub…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwrongwrong163377.hatenablog.com%2Fentry%2F2018%2F12%2F12%2F003000&quot; title=&quot;【プログラミング】末尾再帰を使って反復法（ニュートン法）を実装する【Kotlin】 - wrongwrongな開発日記&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://chart.apis.google.com/chart?cht=tx&amp;chl=%20f%28x%29%20%3D%20x%5E3%20-%202</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-12-12 00:30:00</published>
  <title>【プログラミング】末尾再帰を使って反復法（ニュートン法）を実装する【Kotlin】</title>
  <type>rich</type>
  <url>https://wrongwrong163377.hatenablog.com/entry/2018/12/12/003000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
