<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>inarizuuuushi</author_name>
  <author_url>https://blog.hatena.ne.jp/inarizuuuushi/</author_url>
  <blog_title>Sabrou-mal サブロウ丸</blog_title>
  <blog_url>https://inarizuuuushi.hatenablog.com/</blog_url>
  <categories>
    <anon>アルゴリズム周辺</anon>
  </categories>
  <description>Hornerの公式という多項式の計算を高速に行う方法があります。 と言っても仕組みは簡単で以下のような式変形を行うだけです。 単純に項ごとを足し合わせるよりも、掛け算の回数が減っていることが分かりますね。 計算量はそれぞれ となっています。 実験 # P(x) y = 0 for i in range(n): y = y + a[i]*(x**i) # Horner_P(x) z = 0 for i in range(n): z = a[i] + z*y a_iは全て1(ノートPCで計測) n x 計測時間(P(x))(s) 計測時間(Horner_P(x))(s) 10000 3 0.196…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finarizuuuushi.hatenablog.com%2Fentry%2F2017%2F07%2F21%2F142257&quot; title=&quot;Hornerの公式 - Sabrou-mal サブロウ丸&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.f.st-hatena.com/images/fotolife/i/inarizuuuushi/20170721/20170721133458.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-07-21 14:22:57</published>
  <title>Hornerの公式</title>
  <type>rich</type>
  <url>https://inarizuuuushi.hatenablog.com/entry/2017/07/21/142257</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
