资源 · 指南或文章
Horner's Method
讲解 Horner 法则:通过嵌套各项,只用 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 处结果一致,然后用 Horner 循环解析任意进制的数字字符串。
范围与局限
法则本身是维基百科渲染的图片,行内的循环表达式写得比较随意,请把它当作伪代码。
获取方式与形式
GitHub 上采用 MIT 许可的 trekhleb/javascript-algorithms 仓库中的免费英文 README。
PrepKit 于 2026年10月2日 审核。 资源来源提交: 85293e3e2b88
本概览的依据
- src/algorithms/math/horner-method/README.md
收录此条目的页面
订阅 PrepKit 通讯
可选。使用 PrepKit 并不需要订阅。