I am having this problem with factoring polynomials : the product of the
factors doesn't match the original polynomial. I am using GAP 3.4 and I
am fairly sure this example used to work in the previous release.
################################################################################ t:=Indeterminate(Rationals); t.name:="t"; p:=t^35 - 3*t^33 - t^32 + 3*t^31 + 3*t^30 - 2*t^29 - 4*t^28 + 3*t^27 + 5*t^26 - 2*t^25 - 6*t^24 - 2*t^23 + 4*t^22 + 3*t^21 - t^20 - t^19 + t^16 + t^15 - 3*t^14 - 4*t^13 + 2*t^12 + 6*t^11 + 2*t^10 - 5*t^9 - 3*t^8 + 4*t^7 + 2*t^6 - 3*t^5 - 3*t^4 + t^3 + 3*t^2 - 1; gap> p; t^35 - 3*t^33 - t^32 + 3*t^31 + 3*t^30 - 2*t^29 - 4*t^28 + 3*t^27 + 5*t^26 - 2*t^25 - 6*t^24 - 2*t^23 + 4*t^22 + 3*t^21 - t^20 - t^19 + t^16 + t^15 - 3*t^ 14 - 4*t^13 + 2*t^12 + 6*t^11 + 2*t^10 - 5*t^9 - 3*t^8 + 4*t^7 + 2*t^6 - 3*t^ 5 - 3*t^4 + t^3 + 3*t^2 - 1 gap> f:=Factors(p); [ t - 1, t - 1, t - 1, t - 1, t - 1, t - 1, t - 1, t + 1, t + 1, t + 1, t + 1, t^2 - t + 1, t^2 + t + 1, t^6 + t^5 + t^4 + t^3 + t^2 + t + 1, t^12 + t^11 + t^10 + t^9 + t^8 + t^7 + t^6 + t^5 + t^4 + t^3 + t^2 + t + 1 ] gap> Product(f); t^33 - t^32 - 3*t^31 + 3*t^30 + 3*t^29 - 3*t^28 - 2*t^27 + t^26 + 4*t^25 - 6*t^23 + 4*t^21 - t^19 + t^14 - 4*t^12 + 6*t^10 - 4*t^8 - t^7 + 2*t^6 + 3*t^ 5 - 3*t^4 - 3*t^3 + 3*t^2 + t - 1 gap> p=Product(f); false ################################################################################
I also have this minor question that is unrelated to the above but isn't
worth a seperate post :
The internal routine "AddCoeffs" behaves differently in the new release;
the trailing zeros are not truncated. I have been using this function in
some code I wrote because of its speed; is it bad practice to use internal
functions?
Jacob Hirbawi <JcbHrb@CERF.net>