リソース · ガイド・記事
Horner's Method
項を入れ子にすることで、n 回の足し算と n 回の掛け算で多項式を評価するホーナー法を説明しています。
確認日
元のサイトを開く: Horner's Method (元のサイトを新しいタブで開きます)ロードマップに追加
取り組んでいるロードマップにこのリソースを追加できます。自分用の追加リソースとして表示され、ロードマップの手順は変わらず、記録した手順数にも数えられません。
出典コンテンツの言語:英語
In mathematics, Horner's method (or Horner's scheme) is an algorithm for polynomial evaluation. With this method, it is possible to evaluate a polynomial with only n additions and n multiplications. Hence, its storage requirements are n times the number of bits of x. Horner's method can be based on the following identity: To solve the right part of the identity above, for a given x, we start by iterating through the polynomial from the inside out, accumulating each iteration result. After n iterations, with n being the order of the polynomial, the accumulated result gives us the polynomial evaluation.
PrepKit の概要
この概要は PrepKit 編集部がソースリポジトリをもとに執筆・確認したもので、リソース本文の引用ではありません。
- 対象
- ソースにレベルの記載はありません
- 形式
- リファレンス
扱っている内容
- 4x^4 + 2x^3 + 3x^2 + x + 3 を x = 2 でそのまま評価すると、14回の演算になること
- 同じ多項式の入れ子の形では、足し算4回と掛け算4回になること
使い方
PrepKit の学習アドバイスであり、ソースの主張ではありません。
両方の評価方法を書き、x = 2 で結果が一致するか確かめてください。そのうえで、ホーナー法のループを使って任意の基数の数字列を解析します。
範囲と制約
規則そのものは Wikipedia で描画された画像で、本文中のループの式は厳密ではないため、疑似コードとして扱ってください。
利用方法と形式
GitHub の MIT ライセンスの trekhleb/javascript-algorithms リポジトリにある、英語の無料 README です。
PrepKit が 2026/10/02 に確認しました。 リソースの出典のコミット: 85293e3e2b88
この概要の根拠
- src/algorithms/math/horner-method/README.md
この項目を掲載しているページ
PrepKit ニュースレターを受け取る
任意です。PrepKit の利用には必要ありません。