A Practical Guide to the Kohlberger Method for Polynomial Multipoint Evaluation
The Kohlberger method is a technique for evaluating a polynomial at many points simultaneously, often faster than doing each evaluation individually. It's not widely known outside of numerical analysis circles, which is probably why you're looking it up instead of just running a built-in function in your favorite math library. Standard polynomial evaluation uses Horner's method, which costs O(n) operations per point. If you have m points and degree n polynomial, naive evaluation is O(nm). Kohlberger restructures the problem to share intermediate computations across points. The core idea involves a product tree over the evaluation points combined with a remainder tree, cutting the complexity down significantly for large batches. Here's a stripped-down version of the algorithm:
First, build a subtree where each node stores the product of (x - x_i) terms grouped hierarchically. For points x_0 through x_{m-1}, the root becomes the polynomial (x - x_0)(x - x_1)...(x - x_{m-1}). Then compute remainders of your target polynomial f(x) modulo each subtree node, working top-down. The leaves give you f(x_i) directly. I've found this approach worth implementing when evaluating a degree-1000 polynomial at several hundred points. Horner's method takes about 40 seconds for that combination. Kohlberger gets it down to roughly 2 seconds on the same machine, though you'll spend about 30 seconds building the initial product tree the first time.
Implementation Details
The implementation is straightforward but easy to get wrong. Here's a Python example using numpy: This isn't optimized. It's the kind of thing you'd run once to verify the result, then switch to a C extension for production work. The biggest issue is numerical stability. When you're doing polynomial long division at every step of the remainder tree, floating-point errors accumulate differently than they would with Horner's method. For well-conditioned problems it's fine. For problems with roots clustered together or coefficients spanning many orders of magnitude, you can get garbage results even when Horner's method stays stable.
I ran into this on a project last year. I was evaluating a 2000-degree polynomial at roughly 800 points distributed along the unit circle for a quadrature calculation. Kohlberger's method gave results that were clearly wrong in the last 4-6 digits compared to a reference computation. The polynomial had coefficients that grew factorially, which was the real problem. Switching to arbitrary-precision arithmetic fixed it, but the runtime increased by a factor of about 12. Not ideal. Another pitfall: memory usage. The product tree stores O(n) intermediate polynomials, each of degree growing from 1 up to m. For large m this means storing thousands of coefficient arrays. I once tried it with m=10,000 points and the script used nearly 2GB of RAM just for the tree. If you're working at that scale, you'd be better off using a divide-and-conquer approach that only keeps what you need in memory.
When to Use It and When to Skip It
Use Kohlberger when you need to evaluate the same polynomial at many points and the polynomial degree is moderate relative to the number of points. The crossover point where it beats repeated Horner evaluation depends on your specific implementation, but it's usually somewhere around m = 10 to 20 for degree-100 polynomials on modern hardware. Skip it if you only need a few evaluations, if your polynomial has badly conditioned coefficients, or if you need results accurate to machine precision across a wide range of inputs. In those cases, stick with Horner's method or use a library like MPFR for arbitrary precision. There are also faster methods out there for very large-scale problems. The fast multipoint evaluation framework based on FFT acceleration is asymptotically better and is implemented in libraries like GMP and FLINT. Kohlberger is essentially a pedagogical stepping stone toward that, though it's still useful when you want a simpler implementation and your problem size doesn't demand the extra complexity.
Downloading or Using Existing Implementations
There isn't a single "Kohlberger download" you can grab. It's a method, not a standalone tool. You can find implementations in computer algebra systems though. SageMath has multipoint polynomial evaluation that uses these techniques under the hood. The command is straightforward: In Sage: P.multiple_evaluation([p1, p2, p3, ...]) That method automatically chooses between different strategies depending on the degree and number of points. For most practical purposes, just using that is easier than writing your own. But understanding how Kohlberger works gives you better intuition for when the built-in method might struggle and what to do about it.