The result is a Product each of whose factors is a Power whose base is one of the factors found and whose exponent is an integer.
i1 : y = (2^15-4)/(2^15-5) |
i2 : x = factor y |
i3 : value x |
i4 : peek2(x,100) |
For small integers factorization is done by trial division. Eventually we will have code for large integers. For multivariate polynomials the factorization is done with code of Michael Messollen (see Factorization and characteristic sets library). For univariate polynomials the factorization is in turn done with code of Gert-Martin Greuel and Ruediger Stobbe (see Factory library).
i5 : R = ZZ/101[u] |
i6 : factor (u^3-1) |
i7 : F = frac(ZZ/101[t]) |
i8 : factor ((t^3-1)/(t^3+1)) |
i9 : code(factor,F) |