galois.is_monic¶
- galois.is_monic(poly)¶
Determines whether the polynomial is monic, i.e. having leading coefficient equal to 1.
- Parameters
poly (galois.Poly) – A polynomial over a Galois field.
- Returns
True
if the polynomial is monic.- Return type
Examples
In [375]: GF = galois.GF(7) In [376]: p = galois.Poly([1,0,4,5], field=GF); p Out[376]: Poly(x^3 + 4x + 5, GF(7)) In [377]: galois.is_monic(p) Out[377]: True
In [378]: p = galois.Poly([3,0,4,5], field=GF); p Out[378]: Poly(3x^3 + 4x + 5, GF(7)) In [379]: galois.is_monic(p) Out[379]: False