galois.is_monic¶
- galois.is_monic(poly: Poly) bool ¶
Determines whether the polynomial is monic.
See also
Notes
A monic polynomial has its highest-degree, non-zero coefficient with value 1.
Examples
A monic polynomial over \(\mathrm{GF}(7)\).
In [1]: GF = galois.GF(7) In [2]: p = galois.Poly([1, 0, 4, 5], field=GF); p Out[2]: Poly(x^3 + 4x + 5, GF(7)) In [3]: galois.is_monic(p) Out[3]: True
A non-monic polynomial over \(\mathrm{GF}(7)\).
In [4]: GF = galois.GF(7) In [5]: p = galois.Poly([3, 0, 4, 5], field=GF); p Out[5]: Poly(3x^3 + 4x + 5, GF(7)) In [6]: galois.is_monic(p) Out[6]: False
Last update:
Apr 21, 2022