/**** main program for calling and testing programs in file Univariate ***/ q:= 2^7; GF:=GaloisField(q); Pol:=PolynomialRing(GF); pol:=X^6+X^5+X^4+X^3+1; load "Univariate"; Berlekamp(pol); // Berlekamp's Algorithm CantorZassenhaus(pol); // Cantor-Zassenhaus Algorithm Factorization(pol); // Magma function to check the two algorithms clear ; q:= 3; GF:=GaloisField(q); Pol:=PolynomialRing(GF); pol:= X^7+2*X^5+X^3+2*X ; load "Univariate"; Berlekamp(pol); // Berlekamp's Algorithm CantorZassenhaus(pol); // Cantor-Zassenhaus Algorithm Factorization(pol); // Magma function to check the two algorithms