10-27-2018, 04:14 PM
Currently I'm writing a program which need some operation in Galois field, but I can't find a way to further to use the result of the calculation. So I have some calculations like this:
So far so good, but how can I turn things like the result of g(x^10)+g(x^2) into regular polynomials like x^7+x^5+x^3? Doing subst(g(x^10)+g(x^2),a,x) didn't work...
Code:
g:=GF(2,8,[x,g,a])
--->
GF(2,x^8-x^5-x^3-x-1,[x,g,a],undef)
g(x)
--->
a
g(x^10)
--->
a^7+a^5+a^3+a^2
g(x^10)+g(x^2)
--->
a^7+a^5+a^3
So far so good, but how can I turn things like the result of g(x^10)+g(x^2) into regular polynomials like x^7+x^5+x^3? Doing subst(g(x^10)+g(x^2),a,x) didn't work...