- class property galois.FieldArray.non_squares : FieldArray
All non-squares in the Galois field.
An element \(x\) in \(\mathrm{GF}(p^m)\) is a non-square if there does not exist a \(y\) such that \(y^2 = x\) in the field.
See also
Examples¶
In fields with characteristic 2, no elements are non-squares.
In [1]: GF = galois.GF(2**3, display="poly") In [2]: GF.non_squares Out[2]: GF([], order=2^3)
In fields with characteristic greater than 2, exactly half of the nonzero elements are non-squares.
In [3]: GF = galois.GF(11) In [4]: GF.non_squares Out[4]: GF([ 2, 6, 7, 8, 10], order=11)