93{
95
96 EXPECT_EQ(
ringName(R),
"GF(5,3,Flint)");
97 EXPECT_EQ(R.cardinality(), 125);
98 EXPECT_EQ(R.characteristic(), 5);
99
100 M2_arrayint gen_modpoly = R.getModPolynomialCoeffs();
101 std::cout << "minimal polynomial = ";
103 std::cout << std::endl;
104
106 std::cout << "generator polynomial = ";
108 std::cout << std::endl;
109
110
112 R.init(a);
113
114 for (int i = -130; i < 130; i++)
115 {
116 R.set_from_long(a, i);
118 EXPECT_EQ(coeffs->len, 3);
119 int imodp = i % 5;
120 if (imodp < 0) imodp += 5;
121 EXPECT_EQ(coeffs->array[0], imodp);
122 for (int j = 1; j < 3; j++) EXPECT_EQ(coeffs->array[j], 0);
123
124
125
126 }
127 R.clear(a);
128
130}
void testSomeMore(const T &R)
std::string ringName(const T &R)
fq_zech_struct ElementType
aring-style adapter for FLINT's Zech-logarithm representation of small finite fields GF(p^n).
void dintarray(M2_arrayint a)