Horner evaluation of binary coordinate words #
hornerBits evaluates a polynomial whose coefficients are coordinate words, using a supplied
multiplication operation. Coefficients are indexed in increasing degree; evaluation processes
them from highest to lowest degree and retains one accumulator. This is the evaluator used by
the Justesen code family, shared with its native workspace implementation.
fieldOfBits_hornerBits identifies the result with polynomial evaluation whenever the supplied
multiplication agrees with multiplication in the chosen binary-field basis.
Evaluate coefficient words in increasing-degree order using Horner's rule. Missing bits
are zero and each addition returns exactly b coordinates; the empty polynomial returns [].
Horner's step: the value is the constant coefficient plus x times the value of the
remaining coefficients, with exactly b coordinates.
Horner's fold can be executed with a descending counter and one accumulator. The
coefficient function is queried only at indices below k; no list of indices is allocated.
Horner evaluation agrees with the sum of the represented monomials.