galois.is_monic¶
- galois.is_monic(poly)¶
Determines whether the polynomial is monic.
A monic polynomial has a highest-degree coefficient of 1.
See also
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:
Feb 09, 2022