On 2013-11-14 12:40, Julian Rüth wrote:
I do not know pari well but it seems to me that factorpadic() treats the
input as an exact polynomial. As such t^2+241*t+1 is squarefree.
I just sent a question to the pari-users list and that's exactly what
happens: if you input an exact polynomial, it will return the p-adic
factorization of that polynomial reduced to the precision p^r. In other
words, factorpadic((t-1)^2, 3, 5) in PARI does what is expected.
In Sage, you can ask for the Qp-factorization of polynomials defined
over QQ, but that's broken because it simply first coerces the
coefficients over Qp and then factors it:
sage: R.<t> = PolynomialRing(QQ)
sage: ((t-1)^2).factor_padic(3,10)
(1 + O(3^10))*t^2 + (1 + 2*3 + 2*3^2 + 2*3^3 + 2*3^4 + 2*3^5 + 2*3^6 +
2*3^7 + 2*3^8 + 2*3^9 + O(3^10))*t + (1 + O(3^10))
So this is a bug indeed.
Jeroen.
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.