# TAOCP 4.6.4 Evaluation of Polynomials

> Study guide to TAOCP 4.6.4 Evaluation of Polynomials. Evaluating polynomials efficiently: Horner's rule, evaluating at many points, preprocessing…

Updated October 20, 2026.

## Summary {#summary}

TAOCP 4.6.4 Evaluation of Polynomials: Evaluating polynomials efficiently: Horner's rule, evaluating at many points, preprocessing coefficients to save multiplications, and the related cost of matrix and polynomial operations, including the Fourier transform. Budget about 9 hours; do exercises 1, 2 and 3.

## Key facts {#key-facts}

- Week 88 of 145 on the cracked.guide path, in [TAOCP Vol 2: Seminumerical Algorithms](https://cracked.guide/taocp/volume-2).
- Time budget: about 9 hours.
- 74 exercises in the section, rated 15 to M50; the guide picks 8.
- Picked exercises with Knuth's triangle for recommended: 2, 19, 14 and 51.
- Before you start: 4.6.1 Division of Polynomials and 4.3.3 How Fast Can We Multiply?.

## Week 88 goals {#objectives}

By the end of week 88 you can:

- Use Horner's rule to evaluate a polynomial with n multiplications.
- Explain how preprocessing coefficients saves multiplications for repeated evaluations.
- Recognize the discrete Fourier transform as evaluation at roots of unity.

## This week's steps {#steps}

- Read §4.6.4 Evaluation of Polynomials: Implement Horner's rule and a rolling hash using it.
- Work the exercises (8 picked): Start with Ex 1, Ex 2, Ex 3; log what you solve below.
- Write down one thing you'd explain to someone: A few sentences in your own words in Your notes: the idea, why it works, an example. 30 words ticks this.

## Exercises {#exercises}

This section has 74 exercises, rated 15 to M50, and Knuth marks 21 of them with the triangle for recommended. The largest set in the volume. Do the Horner-style and FFT exercises; sample the lower-bound and tensor-rank exercises only if you enjoy them.

Worth your time:

- 1 (rated 15): Evaluate an odd polynomial efficiently.
- 2 (rated M20, recommended): Shift a polynomial's origin with Horner-like steps or fast multiplication.
- 3 (rated 20): Horner's rule for two variables, with operation counts.
- 41 (rated 22): Complex multiplication with three real multiplications.
- 57 (rated M20): Multiply polynomials with the FFT in n log n time. Implement it.
- 19 (rated M24, recommended): Adapt coefficients ahead of time to save multiplications.
- 14 (rated HM28, recommended): Derive the fast Fourier transform from the text's general scheme.
- 51 (rated M24, recommended): Winograd's small cyclic convolutions. The stretch.

## Why it matters {#why}

Horner's rule is used in every math library and in hashing (polynomial rolling hashes). The FFT view connects to signal processing and fast multiplication.

## Before you start {#before}

- 4.6.1 Division of Polynomials
- 4.3.3 How Fast Can We Multiply?

## How to approach it {#approach}

Implement Horner's rule and a rolling hash using it. Read the coefficient-preprocessing ideas lightly. Spend real time on the discrete Fourier transform discussion if FFT is new to you.

## Common traps {#traps}

- Numerical instability when evaluating with floats at large x.

## Links {#links}

- [Knuth's TAOCP page (editions, errata, MIX/MMIX)](https://www-cs-faculty.stanford.edu/~knuth/taocp.html)
- [Vol 2 errata (plain text, from Knuth)](https://www-cs-faculty.stanford.edu/~knuth/err2.textxt)
- [Wikipedia: Horner's method](https://en.wikipedia.org/wiki/Horner%27s_method)
- [Wikipedia: Fast Fourier transform](https://en.wikipedia.org/wiki/Fast_Fourier_transform)
- [Wikipedia: Rolling hash](https://en.wikipedia.org/wiki/Rolling_hash)

---

Source: https://cracked.guide/guide/knuth-w071-0
cracked.guide: A free, dated 145-week path to getting genuinely cracked at programming.
