Polynomial normalization converts a polynomial into monic form by multiplying every coefficient by the inverse of its leading coefficient. A monic polynomial has leading coefficient 1; this is useful when preparing polynomial multiplication modulo an irreducible polynomial. section 8.7 section 8.4.1
An implementation follows this control flow:
- Scan coefficients from the declared degree downward, skipping zero coefficients. section 8.5
- Return immediately when the first nonzero coefficient is already 1. section 8.5
- Compute the inverse of the leading coefficient, then multiply that inverse into every coefficient through the constant term. section 8.5
Already-monic degree-four polynomial
A test polynomial stores coefficients 1, 2, 1, 3, and 5 from degree four through degree zero. Because its leading coefficient is already 1, normalization performs no scaling. section 8.4.1
