NO DOC.
#include <givaro/gfq.h>
#include <givaro/givpower.h>
#include <givaro/givtimer.h>
int main(
int argc,
char** argv)
{
int64_t p = (argc>1?atoi(argv[1]):5);
int64_t e = (argc>2?atoi(argv[2]):3);
std::cout << "Working in GF(" << p << '^' << e << ')' << std::endl;
std::cout << "Elements are polynomials in X modulo " << p << std::endl;
Pdom.init(G,
Degree((int64_t)
GFq.exponent()-1));
int64_t lowerpart;
GFq.convert(lowerpart, tmp);
std::cout << ' ' << p << "-adic value of the lower part of the irreducible : " << lowerpart << std::endl;
int64_t ptoe =
power(p,e);
std::cout << ' ' << p << '^' << e << " is : " << ptoe << std::endl;
std::cout << " --> Computed irreducible: " << ptoe+lowerpart << std::endl;
std::cout <<
"Stored irreducible: " <<
GFq.irreducible() << std::endl;
PAD.radix(Polynomial,
GFq.irreducible());
std::cout << "Irreducible polynomial coefficients: ";
PrimeField.
write(std::cout <<
' ', *it);
std::cout << std::endl;
PAD.write(std::cout <<
"The latter " <<
GFq.irreducible() <<
" represents: ", Polynomial)
<< " in " << p << "-adic"
<< std::endl;
return 0;
}
Degree type for polynomials.
Definition givdegree.h:28
Definition givcategory.h:51
class GFqDom
Definition gfq.h:44
Rep Element
Definition gfq.h:81
UTT Residu_t
Definition gfq.h:93
std::ostream & write(std::ostream &s) const
Definition gfq.inl:606
Indeterminate.
Definition givindeter.h:24
Definition givpoly1padic.h:24
Field::Element Element
Definition f4n3.cpp:12
int main()
Definition f4n3.cpp:22
Namespace in which the whole Givaro library resides.
Definition all_field.C:23
GFqDom< Size_store > GFq
Definition gfq.h:39
template double power(double x, unsigned int p)